Error importing Excel typelib
-
Hi all. I'm using unmanaged C++ MFC application. And I need to get Excel interfaces. As I know I need to import TypeLib using MFC wizzard. Wizzard is creating a header, excel.tlh and excel.tli files. When i start to compile project, there is 100's of errors in excel.tlh. So the question is: what i've done improperly? May be I need to include additional libraries and headers (tried to include ole.h and ole32.lib). May be someone know some articles, where I can find information about it? Thank's a lot
-
Hi all. I'm using unmanaged C++ MFC application. And I need to get Excel interfaces. As I know I need to import TypeLib using MFC wizzard. Wizzard is creating a header, excel.tlh and excel.tli files. When i start to compile project, there is 100's of errors in excel.tlh. So the question is: what i've done improperly? May be I need to include additional libraries and headers (tried to include ole.h and ole32.lib). May be someone know some articles, where I can find information about it? Thank's a lot
what errors you got?
WhiteSky
-
what errors you got?
WhiteSky
-
Hi all. I'm using unmanaged C++ MFC application. And I need to get Excel interfaces. As I know I need to import TypeLib using MFC wizzard. Wizzard is creating a header, excel.tlh and excel.tli files. When i start to compile project, there is 100's of errors in excel.tlh. So the question is: what i've done improperly? May be I need to include additional libraries and headers (tried to include ole.h and ole32.lib). May be someone know some articles, where I can find information about it? Thank's a lot
progDes wrote:
As I know I need to import TypeLib using MFC wizzard.
Which type library did you use?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
progDes wrote:
As I know I need to import TypeLib using MFC wizzard.
Which type library did you use?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
I just did the same thing (I'm using Excel 2003 whose type library comes from excel.exe) and it works fine. The only files that were created are
excel.h
andexcel.cpp
.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
I just did the same thing (I'm using Excel 2003 whose type library comes from excel.exe) and it works fine. The only files that were created are
excel.h
andexcel.cpp
.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
The TLH and TLI files creating during compilation when #import is executing. I found step by step microsoft sample, but it doesnt works (at home and on work both Office 2003). What VS do you using. I saw that earlier VS creating h and cpp files, but my VS2005 create only .h
-
The TLH and TLI files creating during compilation when #import is executing. I found step by step microsoft sample, but it doesnt works (at home and on work both Office 2003). What VS do you using. I saw that earlier VS creating h and cpp files, but my VS2005 create only .h
progDes wrote:
What VS do you using.
I am using VS6.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
progDes wrote:
What VS do you using.
I am using VS6.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
That's the point. Now i'm thinking about finding Excel 5.0 or 9.0 library, may be it can work. I think, i just have bad office on two computers, installed from 1 CD
progDes wrote:
I think, i just have bad office on two computers...
Can you try using the "bad" type library with VB?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Yes and its works in VB in managed C++ in C#, and even 5.0 library doesnt work in C++. Something wrong here, what can I do improperly?
OK, I'll try to list my actions. 1) Creating a ialog based MFC application (other parameters is by default) 2) Add->Class->MFC class from TypeLib The window contains library list and list of classes that can be created. 3) Selecting the _Application class (only 1 for example) and header is CApplication.h 4) OK 5) Run (it works) 6) Include CApplication.h into any file 7) Run (100's of error) in the top of the header there is #import directive. I've reduced error count by changing attributes of it. So, can you list me your attributes, please? -- modified at 11:20 Tuesday 12th June, 2007
-
Yes and its works in VB in managed C++ in C#, and even 5.0 library doesnt work in C++. Something wrong here, what can I do improperly?