[英]I can't export html table to Excel xls format
我正在使用table2excel jQuery插件將表導出為.xls格式,但是當我將其導出時,它會以.xls格式導出,但是當我使用Microsoft Office Excel打開它時,它顯示“無法打開文件”,然后我使用Google打開它Google Drive上的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轉到: 文件 -> 選項 -> 信任中心 -> 信任中心設置 -> 受保護的視圖,並選中所有復選框並重新啟動excel。
希望這可以幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.