XLR
A simple node module for exporting a data set to an Excel xlsx file.
Heavily inspired by Node-Excel-Export
Using XLR
Example of a config object to generate a Excel worksheet
name: 'name.xlsx' columns: type: 'string' width: 10 rows: merge: stylesXmlFile: 'styles.xml'
- name: Specify worksheet name
- columns:
Array
of column definitions- type: string / date / bool / number
- width: (optional) total characters in cell
- rows:
Array
of data to be exported. Data needs to be a 2D-Array
and should be the same length as the columns array. - merge:
Array
of merge cell objects.- row: row index (starting at 1)
- fromColumn: start the merge from column index (starting at 1)
- toColumn: end the merge at column index (starting at 1)
- stylesXmlFile: Absolute path to Excel
styles.xml
file. An easy way to get astyles.xml
file is to unzip an existing xlsx file which has the desired styles and copy thestyles.xml
file.
Example usage with Express
const express = ;const xlr = ;const app = ; app; app;
License
XLR is © 2017 MADE Code PTY Ltd. It is free software, and may be redistributed under the terms specified in the LICENSE file.
Maintained by
XLR was created and is maintained MADE Agency PTY Ltd. The names and logos for MADE Code are trademarks of MADE Code PTY Ltd.
We love open source software. See our Github Profile for more.
We're always looking for talented people who love programming. Get in touch with us.