gridview导出数据到excel,怎么将16进制改为10进制
GridView2.AllowPaging = False
filldate1()
Response.Clear()
Response.Buffer = True
Response.Charset = "GB2312"
Response.Write("<meta http-equiv=Content-Type content=text/html;charset=GB2312>")
Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(FileName, Encoding.UTF8).ToString())
Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312")
Response.ContentType = "application/ms-excel"
Page.EnableViewState = False
Dim strWriter As New StringWriter()
Dim htw As New HtmlTextWriter(strWriter)
'GridView1.RenderControl(htw)
GridView2.RenderControl(htw)
Response.Write(strWriter.ToString())
'range.NumberFormatLocal = "@"
'GridView2.Item.Cells(0).NumberFormatLocal = "@"
'mso-number-format:"\@"
Response.Flush()
Response.End()
GridView2.AllowPaging = True
filldate1()
现在是这样的
我想换成6000000000000这样的
[解决办法]
在数字前面加个'
[解决办法]
输出数值类型的前面全部加上“'”,转化为文本。 这不是16进制,是科学记数法