首页 > 解决方案 > 如何从 Windows 上的自定义函数访问 Excel API?

问题描述

我正在尝试以类似于此处描述的方式在我的自定义函数中使用 Excel API 。

它在 Excel 的 Mac 版本和 Web 版本上运行良好,但在 Windows 版本上不起作用。

在 Windows 上,reference error Excel is not defined当自定义函数尝试使用var context = new Excel.RequestContext();.

我怎样才能让它在 Windows 上工作?

标签: exceloffice-jsoffice-addinsexcel-addinscustom-functions-excel

解决方案


为了从 Windows 上的自定义函数调用 Excel API,您需要将加载项配置为使用共享运行时。你可以参考教程


推荐阅读