save excel file using FileSaver.js
Try the following code that will help you to create an excel file for you.
var result = ["Item 1", "Item 3"];
const myJsonString = JSON.stringify(result);
const blob = new Blob([myJsonString], {
type: "application/vnd.ms-excel;charset=utf-8"
});
saveAs(blob, "Report.xls");
Demo