hhurz / tableExport.jquery.plugin

jQuery plugin to export a html table to JSON, XML, CSV, TSV, TXT, SQL, Word, Excel, PNG and PDF
MIT License
984 stars 714 forks source link

Export as xlsx file #361

Closed chiragthakuri closed 1 year ago

chiragthakuri commented 1 year ago

Hello i am struggling on how to do this. I have added the xlsx.js dependency file.

Currently, only the file is being exported as xls using this code

$('#excel-data').tableExport({type:'excel',escape:'false'});

How can I change this code in order to generate a xlsx file. thank you!

hhurz commented 1 year ago

$('#excel-data').tableExport({type: 'excel', mso: {fileFormat: 'xlsx'}});

You can find an example file here. There are also some closed issues related to the xlsx format.