I had the task of writing code to export an html table with headers in excel.
What I came up with is the serverSide code:
Response.Clear(); Response.AddHeader("content-disposition", "attachment;filename=myexcel.xls"); Response.ContentType = "application/ms-excel"; System.IO.StringWriter sw = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter hw = new HtmlTextWriter(sw); tbPanel.RenderControl(hw); Response.Write(sw.ToString()); Response.End();
This works pretty well, but there are some utf-8 characters (Russian) that arent showing the correlation in the excel file.
Any ideas I can do with this?
thanks for the help
source share