Errors with #import "Excel9.olb"

  • Thread starter Thread starter Julia
  • Start date Start date
J

Julia

Hi

I have a standard VC++ Win32 DLL that exports some functions. I am
trying to utilize some of the functionality in Excel and as far as I
can tell the easiest way to do that is to #import "Excel9.olb". The
problem is that when I include this line of code I get loads of build
errors like "error C2504: '_IMsoDispObj' : base class undefined".

Does anyone know why I'm getting these errors – am I neglecting to do
something? Or, is there a better way to automate Excel other than
#import, and if so, what?

Many thanks
Julia.
 
Julia said:
I have a standard VC++ Win32 DLL that exports some functions.

I may be wrong, but I don't think we have many experts in C++ in this
newsgroup which focuses on the use of VBA within Excel.

You might be better trying a group such as
microsoft.public.vc.language

The OLB file provides a set of object class definitions for Excel.
In the VB world we would Reference the file rather than Import it - but
I don't know how that translates into C++

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup
 
Back
Top