my code as follows
string attachment = "attachment; filename=GridviewDetails.xls";
Response.ClearContent();
Response.AddHeader("content-disposition", attachment);
Response.ContentType = "application/vnd.ms-excel";
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
Response.Write("");
Response.Write("");
Response.Write("");
Response.Write("
Response.Write("GirdviewDetails"); Response.Write(" | ");
Shakti Singh DulawatPosted May 4, 2016, 10:58 PM