I still have the same issue.
I think that I need to include all of the files that were generated by
selecting the template library, and there were a lot of them.
But, there were no files named excel.h or excel.cpp.
And I get about two hundred compile errors of the format:
Error 1 error C2371: 'FontPtr' : redefinition; different basic
types c:\documents and settings\cconac\my documents\visual studio
2005\projects\excel test3\excel test3\debug\excel.tlh 1219
Error 2 error C2786: 'BOOL (__stdcall *)(HDC,int,int,int,int)' : invalid
operand for __uuidof c:\documents and settings\cconac\my documents\visual
studio 2005\projects\excel test3\excel test3\debug\excel.tlh 1297
Error 3 error C2923: '_com_IIID' : 'Rectangle' is not a valid template type
argument for parameter '_Interface' c:\documents and settings\cconac\my
documents\visual studio 2005\projects\excel test3\excel
test3\debug\excel.tlh 1297
Error 4 error C3203: '_com_IIID' : unspecialized class template can't be
used as a template argument for template parameter '_IIID', expected a real
type c:\documents and settings\cconac\my documents\visual studio
2005\projects\excel test3\excel test3\debug\excel.tlh 1297
Error 5 error C2786: 'BOOL (__stdcall
*)(HDC,int,int,int,int,int,int,int,int)' : invalid operand for
__uuidof c:\documents and settings\cconac\my documents\visual studio
2005\projects\excel test3\excel test3\debug\excel.tlh 1301
Error 6 error C2923: '_com_IIID' : 'Arc' is not a valid template type
argument for parameter '_Interface' c:\documents and settings\cconac\my
documents\visual studio 2005\projects\excel test3\excel
test3\debug\excel.tlh 1301
Post by Cameron_CThanks I will try that.
The instructions say to select Excel.exe. I guess that is why there were so
many.h files created.
I will get back to you.
But thanks very much for the direction. I have my fingers crossed......
Post by AliR (VC++ MVP)Ok for setup 8 through 10 do the following
From the menu select Project/Add Class.
In the Add Class dialog box select MFC Class From TypeLib
In the Avaliable type Library combobox select Microsoft Execl XX.0 Object
Library
Then you can simply select the interfaces that you are interested in and
press finish. If you have selected more than one interface it will create
more than one .h files.
Hope this helps.
AliR.
Post by Cameron_CIt is Q178749.
http://support/microsoft.com/kb/178749
Post by AliR (VC++ MVP)Which knowledgebase article?
AliR.
Post by Cameron_CI am having a problem finding Excel.h.
I understand the file is created when you follow the instructions in the
knowledgebase article.
I am running Visual Studio 2008. Mot MFC 6.0
So, I cannot generate the files.
Do I need to install C++6.0, just to get the files Excel.h and Excel.cpp?
Any advice/ suggestions would be appreciated.
I see the same question was asked a couple of years ago, and I see that the
individual found a solution, but he does not actually say that the solution
was to generate the files under C++ 6.0.
Thank you.