Exporting to Excel in ASP.Net

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
 
R

Rick Spiewak

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.
 

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

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,052
Latest member
KetoBeez

Latest Threads

Top