我正在使用bootstrap-table
在我的页面中显示表格,并使用TableExport.js
,FileSaver.js
和.xlsx.core.min.js
库来将表保存在.xlslx
中格式。
问题是excel中的以下列以通用格式显示,导致值显示为1,00582E+11
,而正确的值为100582012421
。
我尝试data-tableexport-msonumberformat="\@"
强制导出过程将此列视为文本,但结果并未发生变化。我也读了这个类似的question,我创建了一个CSS
类
.text{
mso-number-format:"\@";/*force text*/
}
但这个解决方案对我来说都不适用..
<table id="mytable" class="table table-hover"
...
data-url="myfile.json"
...
>
<thead>
<tr>
...
<th data-field="productId" data-tableexport-msonumberformat="\@">Product</th>
...
</tr>
</thead>
</table>
答案 0 :(得分:0)
在类中使用 tableexport-string
cd C:\Users\user\AppData\Local\Android\Sdk\emulator && emulator -avd Nexus_5_API_28