1
我想将一个html表格导出到Excel。将html表格导出为Excel数字变成日期
表:
<div id="table">
<table>
<thead>
<tr>
<th>Column</th>
<th>Column</th>
</tr>
</thead>
<tbody id="tabbodyExp">
<tr>
<th>2.5</th>
<th>2.6</th>
</tr>
</tbody>
</table>
</div>
脚本:
$("#btnExport").click(function (e) {
window.open('data:application/vnd.ms-excel,' + $('#table').html());
e.preventDefault();
});
但Excel是打开要写入这样的 “2.5” 到日期所有数字。有没有办法阻止,或者我必须写下所有数字“2,5”。