Excel JavaScript API - 如何改变计算模式
Excel JavaScript API - How to change calculation mode
这是我的代码:
Excel.Application.set({calculationMode: "Manual"});
但是编译器抛出
TS2339: Property 'set' does not exist on type 'typeof Application'.
更改计算模式的api是什么?
我认为您只需要像下面的代码那样在上下文中设置计算模式。
async function setCalculationMode() {
await Excel.run(async (context) => {
context.application.calculationMode = Excel.CalculationMode.manual;
await context.sync();
});
}
这是我的代码:
Excel.Application.set({calculationMode: "Manual"});
但是编译器抛出
TS2339: Property 'set' does not exist on type 'typeof Application'.
更改计算模式的api是什么?
我认为您只需要像下面的代码那样在上下文中设置计算模式。
async function setCalculationMode() {
await Excel.run(async (context) => {
context.application.calculationMode = Excel.CalculationMode.manual;
await context.sync();
});
}