https://github.com/apify/xlsx-stream
JavaScript / Node.js library to stream data into an XLSX file
https://github.com/apify/xlsx-stream
Last synced: 8 months ago
JSON representation
JavaScript / Node.js library to stream data into an XLSX file
- Host: GitHub
- URL: https://github.com/apify/xlsx-stream
- Owner: apify
- License: apache-2.0
- Created: 2017-11-10T15:07:15.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-08-07T10:57:53.000Z (almost 2 years ago)
- Last Synced: 2025-04-11T22:11:27.216Z (about 1 year ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/xlsx-write-stream
- Size: 90.8 KB
- Stars: 28
- Watchers: 11
- Forks: 20
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# XLSX Write Stream library
[](https://travis-ci.org/apify/xlsx-stream) [](http://badge.fury.io/js/xlsx-write-stream)
XLSX Write Stream is a streaming writer for XLSX spreadsheets. Its purpose is to replace CSV for large exports, because using
CSV in Excel is very buggy and error prone. It's very efficient and can quickly write hundreds of thousands of rows with
low memory usage.
XLSX Write Stream does not support formatting, charts, comments and a myriad of
other [OOXML](https://en.wikipedia.org/wiki/Office_Open_XML) features. It's strictly an CSV replacement.
## Installation
```node
npm i 'xlsx-write-stream'
```
## Example Usage
```node
import XLSXTransformStream from 'xlsx-write-stream';
// Input stream needs to implement Stream.Readable interface
// and each chunk should be an array of values (only string, date and number are supported value types)
inputStream
.pipe(new XLSXTransformStream()) // This stream transforms the input into a xlsx format
.pipe(fs.createWriteStream('file.xlsx')); // We need to store the result somewhere
```
## License
This package is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).