Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

stephenlacy/exceljs-transform-stream

Repository files navigation

Deprecated: Package moved and renamed. Please use https://github.com/staeco/xlsx-parse-stream

exceljs-transform-stream Build Status

Parse excel (XLSX) files as a through stream to JSON using exceljs

Install

$ npm install exceljs-transform-stream

Usage

const exceljsStream = require('exceljs-transform-stream')

const request = require('superagent')
const through = require('through2')

const req = request.get('http://localhost:8000/file.xlsx')
  .pipe(exceljsStream())
  .on('data', (d) => console.log(String(d), 'line'))
  // => {
          row: 'row1',
          date: '2017-02-08T00:00:00.000Z',
          cost: 100,
          notes: 111
        }


const file = fs.createReadStream(__dirname + '/file.xlsx')
file
  .pipe(exceljsStream())
  .on('data', (d) => console.log(String(d), 'line'))
  // => {
          row: 'row1',
          date: '2017-02-08T00:00:00.000Z',
          cost: 100,
          notes: 111
        }

Options

objectMode

Enable objectMode

default: true

License (MIT)

About

Parse excel (XLSX) files as a through stream to JSON using exceljs

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published