从Excel公式中的UDF删除AddIn路径 [英] Remove AddIn path from UDF in Excel formula

查看:197
本文介绍了从Excel公式中的UDF删除AddIn路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的插件是xla,现在我使用excelDNA,所以它变成了xll,
当我打开以前版本的我的插件(UDB的
)中内置的电子表格时,它会显示带有xla路径的myUDF。例如,当我单击编辑链接并将源更改为 C:... \MyUDFs.xll
时,例如 C:CProgram Files\安装文件夹\MyUDFs.xla!MyUDF,
我弹出一个窗口,显示
Excel无法更新此工作簿中的一个或多个链接。要更新链接,请打开所有链接源文件(单击数据选项卡上的编辑链接。)确保所有计算都已更新。按F9
,然后单击确定,然后MyUDF的路径从xla更改为xll,例如C:\Program Files\Installation文件夹\MyUDFs.xll!MyUDF
对于客户端,这将破坏其先前版本中内置的所有电子表格(可能是100多个)。
我知道我可以编写一个VBA代码来删除所有MyUDF中的路径。但这并不理想,因为用户必须打开电子表格并将代码放入电子表格中并运行。

My addin was xla, now I use excelDNA, so it becomes xll, When I open spreadsheet built in previous version of My addin, for the UDF, it shows myUDF with path of xla. e.g "C:\Program Files\Installation folder\MyUDFs.xla!MyUDF", when I click Edit link and change source to "C:...\MyUDFs.xll" I got a pop up which says "Excel cannot update one or more links in this workbook. To update the links, open all the link source files(click Edit Links on the Data tab). To be sure all calculations are updated. press F9" I click OK, then the path of MyUDF changes from xla to xll, e.g. C:\Program Files\Installation folder\MyUDFs.xll!MyUDF For clients, this will break all their spreadsheets (could be 100+) built in previous version. I know I can write a VBA code to remove paths from all MyUDF. but it is not ideal since users have to open up spreadsheet and put the code in spreadsheet and run.

我想知道是否有更好/更便捷的方式让客户解决问题

I wonder if there is a better/more convenient way for clients to solve the issue thanks

推荐答案

在内部,Excel为.xla函数
和.xll函数存储不同的信息。这并不是一件容易的事,因此您可以将
设为.xll,使其与在
工作表中作为.xla中的函数输入的功能兼容。

Internally, Excel stores different information for an .xla function and an .xll function. It's not so easy to around so that you can make an .xll that is compatible with functions that were entered into the sheet as functions in an .xla.

您还可以通过在.xmlx文件中稍加拨动来查看Excel如何存储此信息。

You can also see how Excel stores this information by poking around inside the .xmlx file a bit.

这个Wilmott讨论可能是相关的:
http:// www。 wilmott.com/messageview.cfm?catid=10&threadid=79763
对于您的情况,我建议最好的做法是将转换宏添加到您的.xll
中,并让用户按当他们
打开尚未转换的电子表格时,点击修复按钮。

This Wilmott discussion might be relevant: http://www.wilmott.com/messageview.cfm?catid=10&threadid=79763 For your case the best I can suggest is adding a conversion macro to your .xll, and having the user press the 'Fix-up' button when they open spreadsheets that have not been converted yet.

这篇关于从Excel公式中的UDF删除AddIn路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆