问题描述
exports.testExcelCreation = async function () {
// construct a streaming XLSX workbook writer with styles and shared strings
const options = {
filename: 'assets/Uploads/Reports/TEST/streamed-workbook.xlsx',useStyles: true,useSharedStrings: true
};
const workBook = new ExcelJs.stream.xlsx.WorkbookWriter(options);
const workSheet = workBook.addWorksheet("sheet 1");
console.log("Success");
}
解决方法
我认为您忘记在await workbook.commit();
之前添加console.log("Success");