-
August 4th, 2010, 07:06 PM
#1
Automating Excel 2007, using Visual Studio 6 (VC++)
Hi!
I have a program that gathers some data for testing equipment then spits it out into an excel sheet. It was working great until we upgraded from 2003 to excel 2007. Now the program just hangs when I attempt to export the data:
This is the code. I need help making this work with excel12 (2007). Thanks if anyone has a tip! I am using Visual C++ 6, everything I could find online is for VC++ 2005 or .net and I couldn't get it to translate =(
#include "excel8.h"
....
_Application app; // Excel 8 Application object
_Workbook book; // Workbook object
_Worksheet sheet; // Worksheet object
COleSafeArray safeData; // SAFEARRAY
COleSafeArray safeInfo; // SAFEARRAY
....
if (!app.CreateDispatch("Excel.Application"))
{
AfxMessageBox("Could not start Excel");
}
else
{
.....
-
August 5th, 2010, 01:07 AM
#2
Re: Automating Excel 2007, using Visual Studio 6 (VC++)
Search this Forum for "excel8.h" or "excel.h" I guess you'll find some useful discussions there.
Victor Nijegorodov
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|