Click here to Skip to main content
15,920,217 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have export to excel functionality in my website.
I have hosted this site on IIS 7.
While performing export to excel operation in IE10, this is giving unable to read file error message.
this problem is coming in IE10 and site is hosted on IIS.
Please give some solution of this problem.
Posted
Comments
ZurdoDev 10-Dec-13 7:36am    
Post your relevant code.
Member 8533630 11-Dec-13 5:04am    
This is some line of code which i have seen on localhost...This problem is not coming on localhost.
dgGrid.ItemStyle.VerticalAlign = VerticalAlign.Top;
dgGrid.HeaderStyle.Font.Bold = true;
dgGrid.DataBind();
dgGrid.RenderControl(hw);

// Write the HTML back to the browser.
Response.ContentType = "application/vnd.ms-excel";
Response.ContentEncoding = System.Text.Encoding.GetEncoding("iso-8859-1");
this.EnableViewState = false;
Response.AddHeader("Content-Disposition", "attachment; filename=" + FileName + ".xls;");
Response.Write(tw.ToString());
Response.End();
dggrid is a datagrid.
creepz03 10-Dec-13 19:39pm    
Does the error only occurs on IE10? Have you tried with other browsers?
Member 8533630 11-Dec-13 4:16am    
Yes i have checked in firefox. Its working. Only problem is coming in IE 10 and 11.
This problem is coming sometime like sometime giving error message or sometime export to excel operation successfully exported the data into the excel sheet.
argeraju 6-Jan-14 7:52am    
I m also facing the same problem , did you find any solution for this problem.

Please reply me. I will appreciate you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900