Partager via


ExcelScript.WorksheetPositionType enum

Position d’une feuille de calcul par rapport à une autre feuille de calcul ou à la collection entière de feuilles de calcul.

Remarques

Exemples

/**
 * 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()}`);
}

Champs

after
before
beginning
end
none