Exporting Data to Excel with Node & DHTMLX
npm install node-dhtmlx-excel




bash
npm install --save node-dhtmlx-excel
`
Note that node-dhtmlx-excel uses ES6 features so only Node.js v4+ is supported.
Usage
$3
`javascript
router.post('/exportXLS', function(req, res, next) { var xmlData = unescape( req.body.grid_xml );
dhtmlX_Export_Excel.start( xmlData )
.then(data => {
// Set the output file name.
res.attachment("output.xlsx");
// Send the workbook.
res.send(data);
})
.catch(next);
});
`
Note that node-dhtmlx-excel uses ES6 features so only Node.js v4+ is supported.
$3
`javascript
grid.toExcel('/exportXLS');
``