I have created a HTML report dynamically. I use the following code to export it to Excel.
Response.ContentType =
Response.AppendHeader(
Response.Charset =
System.IO.
System.Web.UI.
hw.RenderBeginTag(System.Web.UI.
LabelReportBody.RenderControl(hw);
hw.RenderEndTag();
Response.Write(sw);
Response.End();
The problem is, the saved excel file is in a HTML format and when opened, a message box appear stating this fact.
How can i save this report in pure Excel format? Can any one help?