使用bootstrap-table时导出excel开头的0被自动省略

原因是excel“智能”识别数据格式,有时聪明反被聪明误。

解决方案:修改tableExport.js

搜索: if (typeof tdcss != 'undefined' && tdcss !== '') tdstyle = 'style="mso-number-format:\'' + tdcss + '\'';

增加else分支:else { tdstyle = 'style="mso-number-format:\'\\@\''; }

 

posted @ 2020-06-18 22:44  心影  阅读(773)  评论(1编辑  收藏  举报