J
John Walker
Hi,
In asp.net 2.0 I am exporting a gridview to excel using this code:
Dim resp As HttpResponse
resp = Page.Response
resp.ContentType = "application/download"
Page.EnableViewState = False
resp.Charset = String.Empty
resp.AppendHeader("Content-Disposition",
"attachment;filename=Report.xls")
Dim tw As New System.IO.StringWriter
Dim hw As New System.Web.UI.HtmlTextWriter(tw)
gv.AllowPaging = False
gv.RenderControl(hw)
But once in excel some of the numeric values in a text column are being
displayed with some sort of shorthand. An example is 145899325676 gets
changed to 1.45899E+11. Is there a way to format that column
programmatically to text before exporting so that the data is not manipulated?
Thanks,
John
In asp.net 2.0 I am exporting a gridview to excel using this code:
Dim resp As HttpResponse
resp = Page.Response
resp.ContentType = "application/download"
Page.EnableViewState = False
resp.Charset = String.Empty
resp.AppendHeader("Content-Disposition",
"attachment;filename=Report.xls")
Dim tw As New System.IO.StringWriter
Dim hw As New System.Web.UI.HtmlTextWriter(tw)
gv.AllowPaging = False
gv.RenderControl(hw)
But once in excel some of the numeric values in a text column are being
displayed with some sort of shorthand. An example is 145899325676 gets
changed to 1.45899E+11. Is there a way to format that column
programmatically to text before exporting so that the data is not manipulated?
Thanks,
John