https://github.com/jsreport/jsreport-xlsx
jsreport recipe rendering excels directly from open xml
https://github.com/jsreport/jsreport-xlsx
Last synced: about 1 year ago
JSON representation
jsreport recipe rendering excels directly from open xml
- Host: GitHub
- URL: https://github.com/jsreport/jsreport-xlsx
- Owner: jsreport
- License: mit
- Created: 2015-11-05T15:05:47.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-10-12T19:17:49.000Z (over 4 years ago)
- Last Synced: 2025-03-27T11:43:35.232Z (about 1 year ago)
- Language: JavaScript
- Homepage: https://jsreport.net/learn/xlsx
- Size: 1.57 MB
- Stars: 8
- Watchers: 4
- Forks: 9
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**⚠️ This repository has been moved to the monorepo [jsreport/jsreport](https://github.com/jsreport/jsreport)**
--
# jsreport-xlsx
[](https://npmjs.com/package/jsreport-xlsx)
[](https://travis-ci.org/jsreport/jsreport-xlsx)
> jsreport recipe which renders excel reports based on uploaded excel templates by modifying the xlsx source using predefined templating engine helpers
See the docs https://jsreport.net/learn/xlsx
## Installation
>npm install jsreport-xlsx
## jsreport-core
```js
var fs = require('fs')
var jsreport = require('jsreport-core')()
jsreport.use(require('jsreport-xlsx')())
jsreport.use(require('jsreport-handlebars')())
jsreport.init().then(function () {
return jsreport.render({
template: {
recipe: 'xlsx',
engine: 'handlebars',
content: '{{{xlsxPrint}}}',
xlsxTemplate: {
content: fs.readFileSync('Book1.xlsx').toString('base64')
}
}
}).then(function (report) {
report.stream.pipe(fs.createWriteStream('out.xlsx'))
})
})
```