Excel-DNA:在 Excel 的 运行 实例中注销方法

Excel-DNA: Unregister methods in a running instance of Excel

是否可以在不重新启动 Excel 的情况下注销我之前通过 ExcelIntegration.RegisterMethods 注册的方法?

基本上,我正在寻找 ExcelIntegration.RegisterMethods 的对立面。

Excel-DNA 目前不允许您在加载的插件中注销方法。这只是实现的限制,以及导出函数如何连接到 .xll 的本机导出。但是,您可以卸载整个 Excel-DNA 加载项(从另一个加载项),只要它只导出 UDF,而不导出功能区、RTD 服务器或其他 COM 功能。

另一种解决方法是将函数重新注册为 "hidden"。新注册将占用(固定大小).xll 导出 table 中的另一个位置,但至少不会再出现在工作表函数完成列表中。