将表格导出为ex cel,将列导出为文本格式

问题描述 投票:2回答:1

我正在使用bootstrap-table在页面中显示表,并且我使用TableExport.jsFileSaver.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>

我正在使用引导程序表在页面中显示表,并且使用TableExport.js,FileSaver.js和.xlsx.core.min.js库来将表保存为.xlslx格式。问题是下面的...

javascript excel twitter-bootstrap bootstrap-table filesaver.js
1个回答
0
投票

在类中使用tableexport-string

© www.soinside.com 2019 - 2024. All rights reserved.