toolbarClick(args) {
if (args.item.text == "Excel Export") {
const appendExcelExportProperties = {
multipleExport: { type: "NewSheet" }
};
const firstGridExport = this.fgrid.excelExport(
appendExcelExportProperties,
true
);
firstGridExport.then(workbook => {
workbook.worksheets[0].name = "WS1"; // Changed the sheet name
const secondGridExport = this.sgrid.excelExport(
appendExcelExportProperties,
true,
workbook
);
secondGridExport.then(wb => {
wb.worksheets[1].name = "WS2"; // Changed the sheet name
const book = new Workbook(wb, "xlsx");
book.save("Export.xlsx");
});
});
}
} |