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利用DataFormatString屬性設置數據格式的方法
- GridView自定義分頁實例詳解(附demo源碼下載)
- ASP.NET數據綁定GridView控件使用技巧
- 淺析GridView中顯示時間日期格式的問題