Exceljs
-
Hello, how can I setup the exceljs library in jsreport to generate Excel reports?
-
You can use it through jsreport scripts(hooks)
https://jsreport.net/learn/scriptsSomething like this in pseudocode. You just overwrite the result of the template with your own produced with a library.
const xlsxjs = require('xlsjs') async function afterRender(req, res) { const xlsxBuffer = await xlsjs.createSomeStuff() res.content = xlsxBuffer res.meta.contentType = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }