ExcelScript.PrintComments enum

注解

示例

/**
 * This script makes the comments print at the end of the worksheet
 * when the workbook is printed.
 */
function main(workbook: ExcelScript.Workbook) {
  // Access every worksheet in the workbook.
  workbook.getWorksheets().forEach(worksheet => {
    // Get the page layout for each sheet.
    const layout = worksheet.getPageLayout();

    // Change the comment printing settings to print them at the end of the sheet.
    layout.setPrintComments(ExcelScript.PrintComments.endSheet);
  });
}

字段

endSheet

批注打印为工作表末尾的尾注。

inPlace

批注打印在其插入工作表的位置。

noComments

将不打印批注。