Saving in 2007 .xlsx format

I can't work out how to save a work book as the 2007 xml format. I've tried the following code:

book.SaveAsXml("book.xlsx", ExcelXmlSaveType.MSExcel)

When I try and open the resulting document in excel 2007 I get a message saying "Excel can't open the file 'book.xlsx' because the format or extension is not valid".

When I look at the document in a text editor I see that it is an xml document, but I believe that an open office xml document is actually a zip containing a collection of xml documents.

Do I have to call another method to get it to export correctly? I cannot see any likely looking candidates

1 Reply

AD Administrator Syncfusion Team October 1, 2007 10:52 AM UTC


Hi Robert,

Thank you for your interest in Syncfusion products.

To save an .xlsx file in xml format, select the version to 'Excel2007'.

To open that xml file in xls format, select the version to 'Excel97to2003'.

Please refer the attached sample and let me know if you still face any issues.

http://websamples.syncfusion.com/samples/XlsIO.Windows/F68689/main.htm

Regards,
Jaya

Loader.
Up arrow icon