C# OWC11 .xls file gives warning when opening in Excel

Y

Yeshia

I am programically creating an .xls workbook using the OWC11 functions and
the SpreadSheet object. I have tried using the .Export method to save it as
..html, .xml, and .xls. All do open and are fine but a warning is popped up
before opening:

"The file you are trying to open is in a different format than specified by
the file extension. "

It opens fine and is formatted correctly. I am opening it with Excel 2007.
Is there a specific way I need to export it or possibly a different method I
could use? Below is the relevant code. Thanks:


((Worksheet)xlSheet.Worksheets["Sheet1"]).Activate();

xlSheet.Export(cPath, SheetExportActionEnum.ssExportActionNone,
SheetExportFormat.ssExportXMLSpreadsheet);
 

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