export to excel

  • Thread starter Thread starter Mike
  • Start date Start date
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
 
Back
Top