1

From within an Excel VSTO (.NET) add-in, I need to call Excel C API functions (e.g. Excel12), in order to avoid conversion between Excel's data types (xloper12) and managed data.

I know how I could get access to functions defined within an XLL; so in principle, I could write an XLL more or less "forwarding" the functionality which I need. Yet I would like to avoid a "dummy" XLL.

The accepted answer to this

Calling Excel/DLL/XLL functions from C#

question suggests that I find the functionality I need in xlcall32.dll. I'm not sure this assumption is correct.

Yet how do I put that all together? Does my VSTO addin have to load xlcall32.dll?

Community
  • 1
  • 1
JohnB
  • 13,315
  • 4
  • 38
  • 65
  • Maybe you could have a look into the source code of the excellent Excel DNA (open source -https://exceldna.codeplex.com/ ) project by Govert to get some ideas. There is a function called "MarshalNativeToManaged" in XlCustomMarshal12.cs file wich seems to achieve your request. I'm more C++ oriented so I can't help further. – Malick Nov 16 '15 at 01:34
  • Where are you getting the xloper12s? – Govert Nov 16 '15 at 21:04

0 Answers0