I would like to ask, if could somebody help me. I need to add all workbook (with few worksheets and 10 000 rows each) to stream and then use appclient to create attachment on internet webside. The secont part is not importat. I just need to add all workbook to stream. Could somebody help me?.
const Stream = require("stream");
let stream = new Stream.PassThrough();
const options = {
stream: stream,
useStyles: true,
useSharedStrings: true,
};
const workbook = new ExcelJS.stream.xlsx.WorkbookWriter(options);
...
const worksheet = workbook.addWorksheet("People");
const worksheet1 = workbook.addWorksheet("People1");
...
worksheet.commit()
worksheet1.commit();
await workbook.commit();
...
I would like to have all workbook in stream.