GridView导出Excel常见的5种文本格式 原创
时间:2021-06-20 08:48:33|栏目:.NET代码|点击: 次
1) 文本:vnd.ms-excel.numberformat:@
2) 日期:vnd.ms-excel.numberformat:yyyy/mm/dd
3) 数字:vnd.ms-excel.numberformat:#,##0.00
4) 货币:vnd.ms-excel.numberformat:¥#,##0.00
5) 百分比:vnd.ms-excel.numberformat: #0.00%
用法:在GridView的RowDataBound事件中加入代码e.Row.Cells[0].Attributes.Add("style", "vnd.ms-excel.numberformat:@");
上一篇:ASP.NET Core中使用xUnit进行单元测试
栏 目:.NET代码
下一篇:Forms身份认证在IE11下无法保存Cookie的问题
本文标题:GridView导出Excel常见的5种文本格式 原创
本文地址:http://www.codeinn.net/misctech/144951.html






