Export GridView to Excel (xlsx, Excel 2007 Format)

W

walter

Hi
I have my application running in Windows 2000 and uses Office 2000.
Below is the code wrriten to export excel file
Response.ContentType = "application/vnd.ms-excel"
If i try to run the same code in VISTA or XP Machine which uses Office 2007.
I am getting below error.
"The format not supported ... " what it could be the cause and how to
resolve this.
Irrespective of Windows 2000 (Office 2000) , VISTA (Office 2007) or
XP(Office 2007).
Do i need to write any specific code for each OS i use or a single code
which can fix my problem.

Kindly help in this

Thanks
Mwalter.
 
Joined
Dec 18, 2009
Messages
1
Reaction score
0
Export to Excel 2007 xlsx format

xlsx excel format is completely different form any other excel format. It's basically a zipped file! To verify this you can rename an xlsx file to zip and then double click it.

You'll find a lot of xml files inside organized accordingly to Microsoft Office Open xml format specifications.


I :) developed a tool (a dll) which allows an asp.net developer to export data to xls and xlsx starting from sqldatasource, sqldatareader, etc with or without the use of a gridview.

Of course it does NOT require you to install Office on your machine!

You can find it at http://www.gridviewtoexcel.com.

Hope this can help!

Ettore
 

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