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.
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.
-
1
If I change the file name from
.xlsx
to.xls
I get a warning message, but the file opens and looks OK. – Anders Commented Oct 9, 2015 at 7:01
1 Answer
Reset to default 4You 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/t8tegrad/8/