How to support .xls and .xlsx formats while saving/opening Excel files?

I have an application that uses Aspose.Cells to export data into Excel spreadsheets and import edited data from the spreadsheets. I have always been using the Excel 2003 .xls file format while saving during export and opening during import. We want to improve on this to support the Excel 2007 .xlsx format. However,

1. If I change my application to save the spreadsheets in Excel2007xlsx format, then customers who do not have Excel 2007 will not be able to open .xlsx files.

2. Or, if we continue to save/open the speadsheets in Excel2003 format, if customers edit data and save them in .xlsx format in Excel 2007, then the import process will fail.

Is there any auto detect file format API in Aspose.Cells to facilitate opening a file in the appropriate format?

Thanks.

We will check and add this feature soon.

Do you have a planned release to support this? It will facilitate our planning and help us feedback to our customers. Thanks.

Hi,

We will update you soon.

Thank you.

Hi,

Please try this fix.

So, what API is new in the attached Aspose.Cells that I can use to satisfy my requirements? Thanks.

Hi,

Please use Workbook.Open(string fileName) or Workbook.Open(Stream stream) to open the file.

In the two methods, we will check which file format the file is.

If you want to save the xlsx file ,you still should useWorkbook.Save(fileName,FileFormatType.Excel2007Xlsx) or useWorkbook.Save(stream,FileFormatType.Excel2007Xlsx) method.