export to excel

M

Mike

I have a web page that allows the user to select either HTML or Excel
format. I'm able to open the output in Excel but it puts the entire web page
in excel, how can I get only the GridView to go to excel and not the entire
page?

I have this and its exporting the entire HTML page to excel:
Response.AddHeader("content-disposition",
"attachment;filename=output.xls");
Response.ContentType = "application/vnd.xls";

I only want my gridview to excel
 

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,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top