C# .net 导出excel 设置列格式

时间:2020-04-23 17:52:40   收藏:0   阅读:201

//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%

 

 

e.Row.Cells[“”第几列”].Attributes.Add("style", "vnd.ms-excel.numberformat:@");//设置导出excel列格式为文本

 

原文:https://www.cnblogs.com/wzzyuxi/p/12761718.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!