Exporting HTML table to Excel is working fine in Chrome and Firefox but it is not working in Internet Explorer 10.
var tableToExcel = (function() {
var uri
Found a community version of SheetJS that works like a cham!
No warning like "The file format and extension of 'file.xls' don't match. This file could be corrupted or unsafe."
Import the library
Paste the function that calls the library
function doit(type, fn, dl) {
var elt = document.getElementById('data-table');
var wb = XLSX.utils.table_to_book(elt, { sheet: "Sheet JS" });
return dl ?
XLSX.write(wb, { bookType: type, bookSST: true, type: 'base64' }) :
XLSX.writeFile(wb, fn || ('test.' + (type || 'xlsx')));
}
Trigger the function using a button or anything that suit your needs.
Sample code can be found in this page