简体   繁体   English

在Excel之外运行XLL?

[英]Running an XLL outside Excel?

I know this question has been posted before... but I haven't found any answer yet (besides from the generic answers about how XLL are actually DLL, etc). 我知道这个问题以前已经发布过...但是我还没有找到任何答案(除了关于XLL实际上是DLL的通用答案之外)。 Has anybody out there been successful calling a XLL from say C# (using DllImport) without having to load Excel with the XLL loaded as an addin? 有没有人能成功地从C#中调用XLL(使用DllImport),而不必将XLL作为加载项加载到Excel中?

Basically, you would have to create a special XLCALL32.DLL that simulates the Excel host. 基本上,您必须创建一个特殊的XLCALL32.DLL来模拟Excel主机。 It sounds like a lot of work... has anybody done this? 听起来很多工作……有人做过吗? Or seen a product to do it? 还是看过产品来做?

Thanks 谢谢

Evaluating this XLL+ library (which is not free, running on trial atm) which hels to "mock"/"simulate" XLCALC32.dll calls (as it only needs 2 methods from it as far as i understand). 评估这个XLL +库(它不是免费的,可以在试用atm上运行),它很容易“模拟” /“模拟” XLCALC32.dll调用(据我所知,它仅需要2种方法)。 Will let you know if I get somewhere. 如果我到某个地方,会告诉你。

You're on the right track with needing to create your own XLCall32.dll and simulate Excel. 您需要创建自己的XLCall32.dll并模拟Excel处于正确的轨道上。 That's non-trivial given what you can do via the interface that XLLs use to talk to Excel. 鉴于您可以通过XLL用于与Excel进行对话的界面进行操作,这并非易事。 It becomes easier the less of Excel that you need to use from within your XLL, so I guess if you have a known selection of XLLs that you need to use and you know what bits of Excel they access via the XLL interface then you can just replace the bits you need... 您从XLL内使用的Excel越少越容易,因此,我想如果您知道有需要使用的XLL选择,并且知道它们通过XLL接口访问的Excel的哪些位,那么您就可以替换您需要的位...

Why do you want to do this? 为什么要这样做?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM