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

Commit 938f1ed

Browse files
committed
readme
1 parent f253fc3 commit 938f1ed

File tree

3 files changed

+67
-1
lines changed

3 files changed

+67
-1
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2017 Steve Lacy
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# exceljs-transform-stream [![Build Status](https://travis-ci.org/stevelacy/exceljs-transform-stream.svg?branch=master)](https://travis-ci.org/stevelacy/exceljs-transform-stream)
2+
3+
> Parse excel (XLSX) files as a through stream to JSON using exceljs
4+
5+
## Install
6+
7+
```shell
8+
$ npm install exceljs-transform-stream
9+
```
10+
## Usage
11+
12+
```js
13+
14+
const exceljsStream = require('exceljs-transform-stream')
15+
16+
const request = require('superagent')
17+
const through = require('through2')
18+
19+
const req = request.get('http://localhost:8000/file.xlsx')
20+
.pipe(exceljsStream())
21+
.on('data', (d) => console.log(String(d), 'line'))
22+
// => {
23+
row: 'row1',
24+
date: '2017-02-08T00:00:00.000Z',
25+
cost: 100,
26+
notes: 111
27+
}
28+
29+
30+
const file = fs.createReadStream(__dirname + '/file.xlsx')
31+
file
32+
.pipe(exceljsStream())
33+
.on('data', (d) => console.log(String(d), 'line'))
34+
// => {
35+
row: 'row1',
36+
date: '2017-02-08T00:00:00.000Z',
37+
cost: 100,
38+
notes: 111
39+
}
40+
41+
```
42+
43+
44+
## [License](LICENSE) (MIT)

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "exceljs-transform-stream",
3-
"description": "Parse XLSX files as a through stream to exceljs",
3+
"version": "0.1.0",
4+
"description": "Parse excel (XLSX) files as a through stream to JSON using exceljs",
45
"main": "index.js",
56
"repository": {
67
"type": "git",

0 commit comments

Comments
 (0)