Reputation: 4886
I have a HTML table that I want to export to Excel using the table2excel plugin. Unfortunately when I download it, the generated Excel file has an error. How can I fix that?
I have created a JSFiddle.
Basically to call the plugin you just need to do this:
$("#downloadIntermidiate").click(function(){
$("#intermediateTable").table2excel({
exclude: ".noExl",
name: "Excel Document intermediateTable"
});
});
Here #intermediateTable
is the id of the table that has to be printed.
Upvotes: 1
Views: 7474
Reputation: 1478
You fiddle works Fine, Just Changed .xlsx to .xls , it exports
function getFileName(settings) {
return ( settings.filename ? settings.filename : "table2excel") + ".xls";
}
Check this fiddle-> https://jsfiddle.net/t8tegrad/8/
Upvotes: 4