Making an XLL that runs under 32 and 64-bit Excel

半世苍凉 提交于 2021-02-10 22:52:27

问题


We are using XLDNA to make a small VB.net XLL that loads our data files and places the contents in Excel for editing. When we tried to deploy this among our three-person team, it was like an episode of the Three Stooges - it would work fine on one machine but then tell us that it was not a valid XLL on another, causing much head-smacking.

We realized with was 32/64 related, but also found that the machines in question randomly had the 32 or 64 version of Excel even though they are all the same model, running the same OS, installing XL from the same DVD! If we can't figure this out, I suspect our users will have an even harder time of it.

So... is there a way to make a single XLL that contains both 32 and 64 bit code?


回答1:


No, you can't make a single XLL for 32 and 64 bit. See the source for an Excel-DNA based project like PMStockQuote. You'll see it generates two distinct .xll binaries, one for x86 and one for x64. I guess you need to fix your install procedure to figure whether EXCEL.EXE lives under c:\Program Files, or c:\Program Files (x86).



来源:https://stackoverflow.com/questions/28154364/making-an-xll-that-runs-under-32-and-64-bit-excel

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!