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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Excel file showing alert message "the file you are trying to open is in a different format xls" while open excel file

Thread ID:





126414 Oct 14,2016 11:18 AM UTC Oct 17,2016 10:36 AM UTC ASP.NET Web Forms 1
Tags: XlsIO
gaurav singh
Asked On October 14, 2016 11:18 AM UTC

I have 50000 rows in my datatable and i am using following code to import datatable to worksheet to save excel file on drive
Dim worksheet As IWorksheet = workbook.Worksheets(0)
worksheet.ImportDataTable(dtExport, True, 1, 1, True)
also set format by using -worksheet.Columns(i).CellStyle.NumberFormat = "$##,###0"
but when i double click on generated excel file then it's show alert message "the file you are trying to open is in a different format xls than specified by the file extension"
Please help me out
Thanks in advance

Abirami Varadharajan [Syncfusion]
Replied On October 17, 2016 10:36 AM UTC

Hi Gaurav, 
Thank you for contacting Syncfusion support. 
The issue occurs due to the mismatch of ExcelVersion and file extension. To resolve the issue, we request you to set the workbook version as ExcelVersion.Excel97to2003 for “.xls” extension. Kindly use the below code sample. 
Code Sample: 
 workbook.Version = ExcelVersion.Excel97to2003; 

If you are still facing the error, then kindly share us the issue reproducing sample which will be helpful for us to provide a prompt solution at the earliest. 

Please let us know if you have any concerns. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon