08.05
This is a code I used some years ago and I found lately. It is based on an example on codeguru from Val Goloviev who implemented in C++ the AutoXL project from “Microsoft Excel 97 Developer’s Kit” (Microsoft Press, 1997). The credit is all his. Thanks to him I understood how to IDispath communication worked.
I rewrote some of his code, added some exception management, extended with some useful functions to control Excel cell format, and added a wrapper (ExcelCOM) to maintain the main code (where you will include ExcelCOM) free from type conversions and dark voodoo.
This code has been used in production for some time now, and it worked fine. However to post it here I stripped some parts of it, and had to change the exception types, and it is not tested aferwards, so it might contain bugs. Hope it helps someone.
Download it here.
[...] Some time ago I posted an example of Excel Automation using C++. [...]
Hello
I’m Shin in South Korea.
I saw your code and think great..
But I have one question.
I tried to export dll for labview this function.
There is no problem in debug mode, but troble in release mode…
I found that different in runtime library in c++ (I’m developed in vc2008)
I’m trying to test to find this problem…
Do you have any idea about this problem….
thanks…
Hi,
I am not sure about what your problem is…
I need you to explain it a bit more deeply. You can use contact form if you want, and I’ll try to help you.