我无法将 html table 导出为 Excel xls 格式
I can't export html table to Excel xls format
我正在使用 table2excel jQuery 插件将 table 导出为 .xls 格式
但是当我导出它时,它以 .xls 格式导出,但是当我使用 Microsoft Office Excel 打开它时,它给出 "can't open the file",
然后我在 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
去:
文件 -> 选项 -> 信任中心 -> 信任中心设置 -> protected view 并选中所有复选框并重新启动 excel.
希望这对您有所帮助。
我正在使用 table2excel jQuery 插件将 table 导出为 .xls 格式 但是当我导出它时,它以 .xls 格式导出,但是当我使用 Microsoft Office Excel 打开它时,它给出 "can't open the file", 然后我在 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 去: 文件 -> 选项 -> 信任中心 -> 信任中心设置 -> protected view 并选中所有复选框并重新启动 excel.
希望这对您有所帮助。