I am exporting from gridview to excel format. But it is saving as web page. I manually need to save as microsoft excel workbook.Then only it is getting saved as excel. Is there any solution that can be applied to get saved as excel automatically.
Here is the code...
Response.Charset = "";
// If you want the option to open the Excel file without saving then
// comment out the line below
Response.ContentType = "application/vnd.xls";
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
Please help me..