加入收藏 | 设为首页 | 会员中心 | 我要投稿 PHP编程网 - 黄冈站长网 (http://www.0713zz.com/)- 数据应用、建站、人体识别、智能机器人、语音技术!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

GridView导出Excel常见的5种文本格式 原创

发布时间:2016-11-23 07:31:33 所属栏目:MsSql教程 来源:站长网
导读: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% 用法:在GridVi

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:@");

(编辑:PHP编程网 - 黄冈站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读