Exporting to Excel in ASP.Net

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

I need to be able to export data from a web form into MS Excel. I know
you can do it with a VB.net windows application, but how can you do it
with an asp.net application using vb.net? Any help would be
appreciated!

Michael
 
Interesting article, but I wouldn't use Excel directly from ASP.NET.
Instead, if you have your data in an HTML table (a datagrid, for example)
you can download to Excel with this:

Response.ContentType = "application/vnd.ms-excel"
Response.Charset = String.Empty

Also, set .EnableViewState = False for your datagrid.
 
Back
Top