OleFunction does not work with Excel 2003

G

galgani

Hello,
I have design a function in C++ that export data in Excel2K; the
problem is when I uploaded my Excel 2000 to Excel 2003.
The following code works fine on Excel 2000:

if (rExcelIsRunning == false)
{
cExcelApplication = Variant::CreateObject("Excel.Application");
cExcelApplication.OlePropertySet("ScreenUpdating",false);
cExcelApplication.OlePropertySet("EnableEvents",false);
cExcelApplication.OlePropertySet("DisplayAlerts",false);
}
else {....}

cExcelWorkbooks = cExcelApplication.OlePropertyGet("Workbooks");
cExcelWorkbook = cExcelWorkbooks.OleFunction("Open",
rDestinationFile.c_str());
------------> RAISE EXCEPTION: class EOleSysError with message
'Eccezione' <----------

What does it change between Excel 2000 and Excel 2003 about Ole
Automation.

Thank's for the help.

Claudio
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top