xlsx to stream
npm i xlsx2stream
import xlsx2stream, { xlsx2csv, xlsx2json } from 'xlsx2stream'
const { default: xlsx2stream, xlsx2csv, xlsx2json } = await import('xlsx2stream')
const filename = 'data.xlsx'
xlsx2stream(filename)
.on('data', console.log)
.on('end', () => console.log('end'))
// to csv
xlsx2csv(filename).pipe(process.stdout)
// to json
xlsx2json(filename).pipe(process.stdout)
node test.js data.xlsx
MIT