jsreport-xlsx
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/jsreport-xlsx package

2.5.0 • Public • Published

jsreport-xlsx

NPM Version Build Status

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

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'))
  })
})

Readme

Keywords

Package Sidebar

Install

npm i jsreport-xlsx

Weekly Downloads

587

Version

2.5.0

License

MIT

Unpacked Size

125 kB

Total Files

21

Last publish

Collaborators

  • pofider
  • bjrmatos