Download XLSX getting corrupted
I'm trying to convert a HTML table to XLSX uisng AngularJS or even plain JavaScript. When I'm converting to XLS using below its downloading fine and a XLS file is opening. var blob = new Blob([template], {type: "data:application/vnd.ms-excel"}); window.navigator.msSaveOrOpenBlob(blob, "myExcel.xls"); But, my requirement wants the file in XLSX, so I changed the MIME type and extension of file in the same code like below, var blob = new Blob([template], {type: "data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}); window.navigator.msSaveOrOpenBlob(blob, "myExcel.xlsx"); But