Repository navigation
[XLSX-Renderer] Writing a file to a buffer to send as attachment #243
Replies: 1 comment
|
Yes — since xlsx-renderer's render methods resolve with an ExcelJS Workbook instance under the hood, const { Renderer } = require('xlsx-renderer'); app.get('/report', async (req, res) => { res.setHeader('Content-Type', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); No need to write to a temp file on disk first. Just make sure Content-Disposition is set to |
Uh oh!
There was an error while loading. Please reload this page.
Is there an option in the node.js environment, to write the data to a buffer that will be sent to the front-end as an attachment via express.js? something like the
writeBuffer()in the browser version.thanks in advance!
All reactions