node.js - Error: Not implemented Trying to create a stream with ExcelJS -
using node v 5.4.1
i'm trying create stream so:
const program = require('commander'), excel = require('exceljs'), colors = require('colors/safe'), inquirer = require('inquirer'), async = require('async'), stream = require('stream'); program .version('0.0.1') .usage('[options] <file>') .parse(process.argv); if (program.args.length > 0 && program.args[0]) { var workbook = new excel.workbook(); var rs = new stream.readable(); rs.pipe(workbook.xlsx.createinputstream()); < -- error } else { console.log("you did not enter valid file path"); }
but error error: not implemented
which believe because have not implemented ._read
thought maybe workbook.xlsx.createinputstream()
this.
am using stream package wrong? information great thanks
i don't think have this:
var rs = new stream.readable();
just try:
var workbook = new excel.workbook(); stream.pipe(workbook.xlsx.createinputstream());
Comments
Post a Comment