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

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top