ExcelScript.WorksheetPositionType enum
The position of a worksheet relative to another worksheet or the entire worksheet collection.
Remarks
Examples
/**
* This script duplicates a worksheet named "Template".
* The new worksheet is added after the template.
*/
function main(workbook: ExcelScript.Workbook) {
// Get the worksheet named "Template".
let template = workbook.getWorksheet("Template");
// Copy the worksheet.
let newSheet = template.copy(
ExcelScript.WorksheetPositionType.after,
template
);
// Name the worksheet using the current date.
let date = new Date(Date.now());
newSheet.setName(`${date.toDateString()}`);
}
Fields
after | |
before | |
beginning | |
end | |
none |