ExcelScript.InsertShiftDirection enum
确定现有单元格的移动方向,以适应要插入的内容。
注解
示例
/**
* This script inserts headers at the top of the worksheet.
*/
function main(workbook: ExcelScript.Workbook)
{
let currentSheet = workbook.getActiveWorksheet();
// Create headers for 3 columns.
let myHeaders = [["NAME", "ID", "ROLE"]];
// Add a blank first row and push existing data down a row.
let firstRow = currentSheet.getRange("1:1");
firstRow.insert(ExcelScript.InsertShiftDirection.down);
// Add the headers.
currentSheet.getRange("A1:C1").setValues(myHeaders);
}
字段
down | |
right |
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈