阻止Excel将UDF路径保存到公式单元格 [英] Prevent Excel from saving UDF path to formula cells
问题描述
我正在使用一个自定义加载项,该加载项将功能添加到Excel,例如UDF1(param1,param2).
I'm using a custom Add-in which adds functions to Excel, like UDF1(param1, param2).
(1)单元格中的示例调用: = UDF1(param1,param2)
(1) example call in cell: =UDF1(param1, param2)
在保存实现UDF()的workbook1时,Excel会以静默方式将该加载项的路径添加到UDF()的每次调用中.卸载外接程序并重新打开工作簿1时可以看到这一点.
When saving workbook1, which implements UDF(), Excel silently adds the path to the Add-in to each call of UDF(). This can be seen when uninstalling the Add-in and reopening workbook1.
Excel要求更新外部引用,我单击不更新".
Excel asks to update external references, I click "don't update".
(2)新单元格内容:='\ ... \ user \ Desktop \ Addin1'!UDF1(param1,param2)
(2) new cell content: ='\...\user\Desktop\Addin1'!UDF1(param1, param2)
在保存工作簿时如何防止Excel将加载项的路径保存?
我希望新的单元格内容(2)与原始内容(1)相匹配.
I would like the new cell content (2) to match the original content (1).
(当不同的人使用分别安装在其计算机不同位置的相同加载项时,这尤其令人讨厌,因为这需要每次从每个单元格中删除"\ ......!"路径该工作簿是由另一个用户打开的.)
(This is particularly annoying when different people are using the same Add-in, respectively installed in a different location of their computers, as it requires deleting the '\......!' path from each cell each time the workbook is opened by another user.)
在Excel公式中从UDF删除AddIn路径和 http://www.jkp-ads.com/Articles/FixLinks2UDF.asp 不是我想要的,因为建议的解决方案"是解决方法.
Remove AddIn path from UDF in Excel formula and http://www.jkp-ads.com/Articles/FixLinks2UDF.asp is not what I'm looking for, as the suggested "solutions" are workarounds.
推荐答案
您对问题进行了很好的研究*,并且发现了自己不喜欢的答案:您不可能做的事.
You researched very well the issue*, and you found the answer that you did not like: what you want to do is not possible.
这就是Excel引用UDF的方式(类似地,当您引用打开或未打开的工作簿中的单元格时.)
That is the way Excel refers to UDFs (similarly, when you refer to cells in open vs. not-open workbooks).
您需要一种变通方法,或者是您提供的链接中提出的解决方法,或者可能是替代方法.
You need a workaround, either of those proposed in the links you provide, or perhaps something alternative.
.*这不是典型的情况.
.* It is not the typical case.
这篇关于阻止Excel将UDF路径保存到公式单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!