ExcelScript.WorkbookLinksRefreshMode enum
表示工作簿链接的刷新模式。
注解
示例
/**
* This script refreshes all the links to external workbooks,
* if the linked workbook refresh mode is set to manual.
* To learn about linked workbooks, see https://support.microsoft.com/office/c98d1803-dd75-4668-ac6a-d7cca2a9b95f.
*/
function main(workbook: ExcelScript.Workbook) {
// Check the refresh mode.
if (workbook.getLinkedWorkbookRefreshMode() === ExcelScript.WorkbookLinksRefreshMode.manual) {
console.log("Refreshing workbook links");
// Trigger a refresh of linked workbook content.
workbook.refreshAllLinksToLinkedWorkbooks();
}
}
字段
automatic | 工作簿链接按 Excel 应用程序确定的固定间隔更新。 |
manual | 工作簿链接是手动更新的。 |