Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel.h file

Status
Not open for further replies.

niulian

Programmer
Jan 9, 2002
3
DE
I create a project using Visual C++.NET 2003 and i need to save some results in a Excel file. I use Microsoft Excel 2002 and i need the Excel.h file in my project. My question is where can i find this file (Excel.h) ?
 
there is no such file. You can generate declarations by #import-ing the excel.olb

Ion Filipski
1c.bmp
 
I use the Class Wizard to add a new class from the type library located in excel.exe.
MSDN says that Visual Studio is supposed to generate excel.h and excel.cpp, containing all the needed declarations, but it doesn't. Is this a bug? Or maybe it was working for older versions of Visual C...

I don't know how to do this manually (is this what you mean by #import-ing excel.olb?). Can you give me some more hints?
 
with ClassWizard generate a class from an OLE or an ActiveX object. You will be asked to browse for the ActiveX name or something like this. Choose "From Type Library" and browse for excel.olb (rather it is .olb but it could be also a .tlb). Instead of "excel" you may find "excel8" or something like that.

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top