File-Saver download screen table is saved in excel format

I now use the angularjs2 framework, typescript + File-Saver to download the table data on the screen and save it to excel

function onDownload (data) {
const blob = new Blob ([$("- sharptable"). Html ()],

{ type: "application/vnd.ms-excel;" });

saveAs (blob, "export.xls");
}

The

download can proceed normally, but when I open excel, it will prompt me that the file format or file extension is incorrect and whether to continue.
ask the bosses if they have a solution.

Mar.13,2021

your this is obviously saved in text format (because the content of your blob is .html). If it is in csv format, you should use csv as the extension of the downloaded file, so that excel will not report an error.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5b12f-455f2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5b12f-455f2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?