TableExport
TableExport copied to clipboard
How to download the excel file without adding to DOM?
I'm using this right now to force the download automatically. How can I do this in the more cleaner intended way? (because it feels like a hack right now)
exportToExcel : function(table, filename, sheetname) {
var g = $(table).hide();
$("body").append(g);
$(g).tableExport({
filename: filename,
formats: ["xlsx"],
sheetname : sheetname
});
g.find("caption button").click();
g.remove();
},