The file format and extension of ABC.xls don't match.
Opened this issue · 0 comments
hahndarryl commented
Is there a way to configure Angular File Saver to export an html web page to an excel file, without having to see this error message from excel? (And do it without having to set the user's Excel Trusted Location settings)
The file format and extension of ABC.xls don't match. The file could be corrupted or unsafe. Unless you trust its source, don't open it. Do you want to open it anyway?
I'm currently using Angular File Saver like this:
var blob = new Blob([document.getElementById(tableId).innerHTML], {
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"
});
FileSaver.saveAs(blob, fileName + ".xls");
thanks,
Darryl