我正在使用table2excel jquery插件将表导出到.xls格式但是,当我导出它时,它以.xls导出,但是当我使用Microsoft Office excel打开它时,它给出了"无法打开文件",然后我在Google Drive上使用Google Office打开它它可以正确打开,但使用Google Word。
我想在Office Excel上打开文件。这是我的代码:
$('#excel').click(function(){
$("#tables").table2excel({
exclude: ".table",
name: "Worksheet Name",
filename: "Rapor",
fileext: ".xls",
exclude_img: true,
exclude_links: true,
exclude_inputs: true
});
});
<table class="table" id="tables">
<thead class="thead-inverse">
<tr>
<th>Mağaza Adı</th>
<th>ID No</th>
<th>Ariza Sınıfı</th>
<th>İş Tipi</th>
<th>Tarih</th>
<th>Malzeme Kodu</th>
<th>Malzeme Adi</th>
<th>Miktar</th>
<th>Birim</th>
<th>Fiyat</th>
<th>Toplam Fiyat</th>
</tr>
</thead>
</table>
打开Excel去: file -> options -> 信任中心 -> 信任中心设置 -> 受保护的视图并检查所有复选框并重新启动Excel。
希望这会有所帮助。