使用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:\'\\@\''; }

猜你喜欢

转载自www.cnblogs.com/q251458060/p/13160594.html