phpexcel-stream
v1.0.1
Published
Memory-efficient spreadsheet to CSV converter
Downloads
6
Maintainers
Readme
node-phpexcel-stream
Memory-efficient spreadsheet to CSV converter. Won't make you love PHP, but it handles big files well and supports 8 different file formats.
example
var excel = require('phpexcel-stream')
, fs = require('fs')
, csvParser = require('csv-parser')
, JSONStream = require('jsonstream')
fs.createReadStream('test/air_pollution_nl.xlsx')
.pipe( excel() )
.pipe( csvParser() )
.pipe( JSONStream.stringify() )
.pipe( process.stdout )
api
excel([extension])
Returns a duplex stream - give it a spreadsheet, get back CSV. Optionally pass extension
as a file format hint to PHPExcel (format is autodetected otherwise).
supported file formats
- Office Open XML (.xlsx) (Excel 2007 and above)
- SpreadsheetML (.xml) (Excel 2003)
- BIFF 5-8 (.xls) (Excel 95 and above)
- Open Document Format/OASIS (.ods)
- Gnumeric (GNOME)
- HTML (why)
- SYLK (no idea)
- CSV (but you can and should use csv-parser in node)
requirements
- PHP >= 5.4.0, must be available in
PATH
install
With npm do:
npm install phpexcel-stream
license
MIT © Vincent Weevers. Test data © Statistics Netherlands, The Hague/Heerlen.