我在COM服务器中编写了几个Excel UDF。我想获得按 fx 时获得的标准帮助(插入函数对话框)。是的,我可以看到我的COM服务器列在类别下拉列表中,但是
这是我得到的跛足:
Insert Function dialog http://www.iwebthereforeiam.com/files/Insert%20function%20dialog.gif
我是否可以将.NET属性放在将其传递给Excel的方法上?
(我看到在ExcelDNA中看起来很容易,但我不会那样做。模仿govert的代码[自定义属性,某种类型的加载器等]看起来很难。)< / p>
如果您以前没有使用Excel + COM服务器,这里有一些有用的资源可以加快速度:
以前的StackOverflow问题:
How to get COM Server for Excel written in VB.NET installed and registered in Automation Servers list?
How Add a COM-Exposed .NET Project to the VB6 (or VBA) References Dialog?
其他资源:
Writing user defined functions for Excel in .NET
Build and Deploy a .NET COM Assembly
Writing Custom Excel Worksheet Functions in C#
编辑2009-10-20 14:10
我尝试在Application.MacroOptions
中调用Sub New()
。
Cannot register assembly "...\Foo.dll". Exception has been thrown by the target of an invocation.
我怀疑这对于MacroOptions和Charles推荐的更复杂的路线都是一个问题。
编辑2009-10-20 14:55
从好的方面来说,Mike建议创建一个实现的接口确实可以消除暴露的烦人的额外方法。
编辑2009-10-20 15:00
从2007年初开始的This Microsoft article(通过Mike's link)似乎是一个相当完整的答案:
自动化加载项和功能 向导
每个自动化加载项都有自己的加载项 Excel函数向导中的类别。 类别名称是ProgID 加载项;你不能指定一个 自动化的不同类别名称 加载项功能。另外,那里 无法指定功能 描述,参数描述, 或帮助自动化加载项 功能向导中的功能。
1嗯,一个StackOverFlow错误。看起来你不能在显式HTML ul-list中使用斜体字符串?
答案 0 :(得分:11)
答案 1 :(得分:3)
您可以使用其中一个.Net Excel系统,如ExcelDNA或ADDIN Express,或者尝试调整其中一个VBA / VB6解决方案:看看Laurent Longre的FunCustomise http://xcell05.free.fr/english/index.html 或Jan Karel Pieterse在http://www.jkp-ads.com/Articles/RegisterUDF00.asp的文章 它使用函数重载hack。