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

//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列格式为文本

 

猜你喜欢

转载自www.cnblogs.com/wzzyuxi/p/12761718.html