Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
ExcelScript.KeyboardDirection enum
- Package:
- ExcelScript
Remarks
Used by
Examples
/**
* This script makes the font bold on all the contiguous cells between
* A1 and the bottom of the used range of the first column.
*/
function main(workbook: ExcelScript.Workbook)
{
// Get the current worksheet.
let selectedSheet = workbook.getActiveWorksheet();
// Get every cell that's used between A1 and the end of the column.
// This recreates the Ctrl+Shift+Down arrow key behavior.
let firstCell = selectedSheet.getRange("A1");
let firstColumn = firstCell.getExtendedRange(ExcelScript.KeyboardDirection.down);
// Set the font to bold in that range.
firstColumn.getFormat().getFont().setBold(true);
}
Fields
| down |
| left |
| right |
| up |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Office Scripts
Feedback
Was this page helpful?
