We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

xlsx file not opening with Excel 2013 / 2010

Thread ID:

Created:

Updated:

Platform:

Replies:

116454 May 27,2014 08:36 AM May 28,2014 12:28 AM ASP.NET Web Forms (Classic) 1
loading
Tags: XlsIO
Venkata Ramaiah Potla
Asked On May 27, 2014 08:36 AM

HI , I am trying to download  zip file which is having Excel1.xlsx file . When I extract zip file tried to open excel its giving error "Excel cannot open the file Excel1.xlsx because the file format or extension is not valid" . before downloading Zip file I am creating writing data to excel compressing .

same thing If I am creating file with extension ".xls" its opening without any error message .

REgards,

Venkat


Prasanth M [Syncfusion]
Replied On May 28, 2014 12:28 AM

Hi Venkata,

Error Message- “file format or extension is not valid”:

If the file format is different than the extension then the MS Excel show the error “file format or extension is not valid”. Can you let me know whether you are generating the xlsx file using XlsIO with the Version property? Find the code snippet and online documentation link to change the workbook version using XlsIO.

Code Snippet to change the Workbook Version:

//Select the version to be saved

workbook.Version = ExcelVersion.Excel2007; //or

//workbook.Version = ExcelVersion.Excel2010;

 

//Save it as "Excel2007" format.

workbook.SaveAs("Sample.xlsx");

 

Online Documentation to change the Workbook Version:

http://help.syncfusion.com/ug/asp.net/xlsio/default.htm#!Documents/xlsx.htm

 

If still the issue is reproducing then share us the code snippet which reproduces the issue.

 

Thanks,
Prasanth


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;