Hi ,
string strCode;
strCode = "ExcelReport.xls";
string attachment = "attachment; filename=" + strCode;
Response.ClearContent();
Response.AddHeader("content-disposition", attachment);
Response.ContentType = "application/ms-excel";
StringWriter sw = new StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(sw);
tblExport.RenderControl(htw);
Response.Write(sw.ToString());
Response.End();
The above code is working fine with windows 2007 ,but not in windows 10 which have Office365.
Can you please assist here.