问题描述
我正在尝试以类似于here所述的方式在自定义函数中使用Excel API。
它在Mac版本的Excel和Web版本上都可以很好地运行,但是,在Windows版本上则不能运行。
在Windows上,当自定义函数尝试使用reference error Excel is not defined
访问上下文时,我在调试日志中看到var context = new Excel.RequestContext();
。
如何在Windows上使用它?
解决方法
为了从Windows上的自定义函数调用Excel API,您需要配置外接程序以使用共享运行时。您可以参考tutorial。