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:@");
最后
以上就是留胡子蓝天最近收集整理的关于GridView导出Excel常见的5种文本格式 原创的全部内容,更多相关GridView导出Excel常见的5种文本格式内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复