ExcelScript.CalculationType enum
注解
示例
/**
* This script fully recalculates the entire workbook.
* This code is useful when automatic recalculation is turned off
* but later parts of the script rely on updated values.
*/
function main(workbook: ExcelScript.Workbook, workbookURL: string) {
const application = workbook.getApplication();
application.calculate(ExcelScript.CalculationType.fullRebuild);
}
字段
full | :这会将所有单元格都标记为脏,然后重新计算所有单元格。 |
fullRebuild | 这将重新生成完整的依赖项链,将所有单元格标记为脏然后重新计算它们。 |
recalculate | 重新计算 Excel 已标记为脏的所有单元格(即可变或已更改的数据的从属单元格),以及以编程方式标记为脏的单元格。 |