ExcelScript.KeyboardDirection enum
Hinweise
Beispiele
/**
* 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);
}
Felder
down | |
left | |
right | |
up |
Zusammenarbeit auf GitHub
Die Quelle für diesen Inhalt finden Sie auf GitHub, wo Sie auch Issues und Pull Requests erstellen und überprüfen können. Weitere Informationen finden Sie in unserem Leitfaden für Mitwirkende.
Office Scripts
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für