Calling an XLL from (unmanaged) C++

时光毁灭记忆、已成空白 提交于 2019-12-13 02:57:49

问题


I have an XLL Excel addin and now another team wants to use the same functionality in their project (unmanaged C++). Is there a way to interface with this XLL directly from C++?


回答1:


Is you XLL un managed or unmanaged code?

As far as I know, an unmanaged C++ XLL file is in fact a DLL that exports specific methods called by Excel.

If your XLL has a .def file, maybe you could add method that would be called by the other team.




回答2:


You can use GET.WORKSPACE(44) to get a list of the add-ins and their argument signatures. If you no hablo macro sheets, load xllutility.xll from http://sdrv.ms/JtaMIV and call =GET_WORKSPACE(44) in a cell. (Note the underscore.)

The second column is the name of the function and the third is the argument list encoded as described here: http://msdn.microsoft.com/en-us/library/office/bb687900.aspx

Use the handy adjust.xll from the link above to adjust the output to the correct size.



来源:https://stackoverflow.com/questions/278025/calling-an-xll-from-unmanaged-c

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