Excel 2007 save compatibility issue


S

Sarang

Hi All,

I've been running into saving the excel workbook in compatibilty mode
issues with automation.

Steps are:

Open Excel 2007:
Now i go to the office button on the top left and set the options to
save in office 97-2003 format.

Now you cannot add more than 256 columns of data.

close the Excel.


Automation code with me something like this:

CLSID clsid;
HRESULT h = CLSIDFromProgID(L"Excel.Sheet", &clsid);

// some more stuff here

h = ::OleCreate(clsid, IID_IOleObject, OLERENDER_NONE, NULL, site,
context->storage, (void **) &oleObject);

// some more stuff here

h = ::OleRun(oleObject);

oleObject->DoVerb(OLEIVERB_OPEN, NULL, context->site, 0, NULL, NULL);


This will bring up the Excel 2007 and set it running.


Now if you check the save options it will still show the saving format
at .doc but will gladly allow you to add more than 256 columns of
data.
And now if you save it will not save in .doc format.


Please let me know if I'm missing something here.


Thanks in advance,
Sarang Baheti.
 
Ad

Advertisements

S

Sarang

Hi All,

I've been running into saving the excel workbook in compatibilty mode
issues with automation.

Steps are:

Open Excel 2007:
Now i go to the office button on the top left and set the options to
save in office 97-2003 format.

Now you cannot add more than 256 columns of data.

close the Excel.

Automation code with me something like this:

CLSID clsid;
HRESULT h = CLSIDFromProgID(L"Excel.Sheet", &clsid);

// some more stuff here

h = ::OleCreate(clsid, IID_IOleObject, OLERENDER_NONE, NULL, site,
context->storage, (void **) &oleObject);

// some more stuff here

h = ::OleRun(oleObject);

Actually here the launching Excel process fails with error code
0x80030002(STG_E_FILENOTFOUND)
Also I'm trying to open a xlsx file thru structured storage file. Is
this valid?

This code works perfectly fine on machine where Excel2007 is installed
and I'm trying to run Excel2007 workbook thru OleRun.

Also I have installed compatibility pack on top of Office 2003 so that
it opens any of Office2007 files correctly.
 

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