Reputation: 365
I'm using table2excel jQuery plugin to export table to .xls format but when I export it it exports in .xls but when I open it using Microsoft Office Excel its gives "can't open the file", then I open it using Google Office on Google Drive it opens it correctly but using Google Word.
I want to open the file on Office Excel. This is my code:
$('#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>
Upvotes: 0
Views: 357
Reputation: 1371
Open Excel go to: file -> options -> trust center -> trust center settings -> protected view and check all checkboxes and restart excel.
Hope this helps.
Upvotes: 2