I need to programatically write an Excel 2003 file with charts on it. I've found examples of how to do it in Visual C++ and I have developed a working Visual C++ 6.0 copy of the example from Microsoft:
How To Use MFC to Create a Microsoft Excel Chart:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;178783
What I don't understand is where the documentation is that tells programmers how to do these various tasks with the spreadsheet. The excel.h and excell.cpp files certainly don't, they don't have any comments at all. Poking around got me to this documentation:
Microsoft Office Visual Basic for Applications Language References
http://www.microsoft.com/downloads/details.aspx?FamilyID=2204a62e-4877-4563-8e83-4848dda796e4&DisplayLang=en
I had hoped that I would be able to figure out the C++ code from the visual basic documentation, but no such luck. For instance, the VB way to 'Open' a worksheet is given as:
Workbooks.Open "filename.xls"
But in the C++ version this is done as:
COleVariant covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);
LPDISPATCH lpDisp = books.Open("C:\\path\\filename",
covOptional, covOptional, covOptional, covOptional,
covOptional, covOptional, covOptional, covOptional,
covOptional, covOptional, covOptional, covOptional,
covOptional, covOptional);
So how did the programmer get from the VB version to the C++ version? The excel.h and excel.cpp files give me the expected function arguments, but they don't tell what the arguments mean or what they are used for. What am I missing?
Thanks.
Jean Palmer
Northrop Grumman
- [EMAIL PROTECTED]
_______________________________________________ msvc mailing list msvc@beginthread.com See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription changes, and list archive.