Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xlsx-write-stream

Package Overview
Dependencies
Maintainers
10
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xlsx-write-stream - npm Package Compare versions

Comparing version 0.0.23 to 1.0.0-beta.0

CHANGELOG.md

2

dist/index.js
'use strict';
module.exports = require('./XLSXWriteStream.js').default;
module.exports = require('./XLSXTransformStream').default;

@@ -10,3 +10,3 @@ 'use strict';

const unixTimestamp = value.getTime();
const officeTimestamp = unixTimestamp / 86400000 + 25569;
const officeTimestamp = unixTimestamp / MILLISECONDS_IN_ONE_DAY + OFFSET_DAYS;
const maybeFormat = shouldFormat && (0, _utils.getDateFormat)();

@@ -29,2 +29,8 @@ return `<c r="${cell}" t="n"${maybeFormat ? ` s="${maybeFormat}"` : ''}><v>${officeTimestamp}</v></c>`;

var _utils = require('../utils');
var _utils = require('../utils');
// 25569 = Days between 1970/01/01 and 1900/01/01 (min date in Windows Excel)
const OFFSET_DAYS = 25569;
// 24 * 60 * 60 * 1000
const MILLISECONDS_IN_ONE_DAY = 86400000;

@@ -7,2 +7,11 @@ 'use strict';

var _cell = require('./cell');
Object.defineProperty(exports, 'Cell', {
enumerable: true,
get: function () {
return _interopRequireDefault(_cell).default;
}
});
var _row = require('./row');

@@ -9,0 +18,0 @@

@@ -17,5 +17,5 @@ 'use strict';

do {
position = remaining % 26;
position = remaining % baseString.length;
cellXPosition = baseString[position] + cellXPosition;
remaining = Math.floor(remaining / 26) - 1;
remaining = Math.floor(remaining / baseString.length) - 1;
} while (remaining >= 0);

@@ -22,0 +22,0 @@ return `${cellXPosition}${rowIndex + 1}`;

{
"name": "xlsx-write-stream",
"version": "0.0.23",
"description": "XLSX stream writer",
"main": "dist/index.js",
"keywords": [
"apify",
"apifier",
"xslx",
"stream"
],
"author": {
"name": "Apify",
"email": "support@apify.com",
"url": "https://www.apify.com"
},
"contributors": [
"Jaroslav Hejlek <jaroslav@apify.com>"
],
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "git+https://github.com/apifytech/xlsx-stream"
},
"bugs": {
"url": "https://github.com/apifytech/xlsx-stream"
},
"homepage": "https://github.com/apifytech/xlsx-stream",
"files": [
"dist"
],
"scripts": {
"start": "npm run build && node dist/index.js",
"build": "npm run clean && babel src --out-dir dist",
"test": "npm run build && mocha --compilers js:babel-core/register --recursive",
"test-cov": "npm run build && babel-node node_modules/isparta/bin/isparta cover --report html --report text node_modules/.bin/_mocha",
"prepare": "npm run build",
"clean": "rm -rf dist",
"lint": "eslint src test",
"prepublishOnly": "(test $RUNNING_FROM_SCRIPT || (echo \"You must use publish.sh instead of 'npm publish' directly!\"; exit 1)) && npm test && npm run lint"
},
"dependencies": {
"archiver": "^2.1.0",
"lodash": "^4.17.4"
},
"devDependencies": {
"apify-jsdoc-template": "github:apifytech/apify-jsdoc-template",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-eslint": "^8.0.1",
"babel-preset-node8": "^1.2.0",
"chai": "^4.1.2",
"eslint": "^4.9.0",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "6.0.2",
"eslint-plugin-mocha": "^4.11.0",
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-react": "7.4.0",
"isparta": "^4.0.0",
"mocha": "^4.0.1",
"sinon": "^4.0.1",
"sinon-stub-promise": "^4.0.0"
}
"name": "xlsx-write-stream",
"version": "1.0.0-beta.0",
"description": "XLSX stream writer",
"main": "dist/index.js",
"keywords": [
"apify",
"apifier",
"xlsx",
"stream"
],
"author": {
"name": "Apify",
"email": "support@apify.com",
"url": "https://www.apify.com"
},
"contributors": [
"Jaroslav Hejlek <jaroslav@apify.com>"
],
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "git+https://github.com/apify/xlsx-stream"
},
"bugs": {
"url": "https://github.com/apify/xlsx-stream"
},
"homepage": "https://github.com/apify/xlsx-stream",
"files": [
"dist"
],
"scripts": {
"start": "npm run build && node dist/index.js",
"build": "npm run clean && babel src --out-dir dist",
"test": "npm run build && mocha --require babel-core/register --recursive",
"test-cov": "npm run build && babel-node node_modules/isparta/bin/isparta cover --report html --report text node_modules/.bin/_mocha",
"prepare": "npm run build",
"clean": "rm -rf dist",
"lint": "eslint src test"
},
"dependencies": {
"archiver": "^5.3.0",
"lodash": "^4.17.4"
},
"devDependencies": {
"apify-jsdoc-template": "github:apify/apify-jsdoc-template",
"babel-cli": "^6.18.0",
"babel-core": "^6.26.0",
"babel-eslint": "^8.0.1",
"babel-preset-node8": "^1.2.0",
"chai": "^4.1.2",
"eslint": "^4.9.0",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "6.0.2",
"eslint-plugin-mocha": "^4.11.0",
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-react": "7.4.0",
"isparta": "^4.0.0",
"mocha": "^8.3.2",
"sinon": "^4.0.1",
"sinon-stub-promise": "^4.0.0",
"unzipper": "^0.10.11"
}
}

@@ -1,3 +0,5 @@

# XLSX Write Stream [![Build Status](https://travis-ci.org/apifytech/xlsx-stream.svg)](https://travis-ci.org/apifytech/xlsx-stream) [![npm version](https://badge.fury.io/js/xlsx-write-stream.svg)](http://badge.fury.io/js/xlsx-write-stream)
# XLSX Write Stream library
[![Build Status](https://travis-ci.org/apify/xlsx-stream.svg?branch=master)](https://travis-ci.org/apify/xlsx-stream) [![npm version](https://badge.fury.io/js/xlsx-write-stream.svg)](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

@@ -19,18 +21,9 @@ CSV in Excel is very buggy and error prone. It's very efficient and can quickly write hundreds of thousands of rows with

```node
import XLSXWriteStream from 'xlsx-write-stream';
import XLSXTransformStream from 'xlsx-write-stream';
// Initialize the writer
const xlsxWriter = new XLSXWriteStream();
// Set input stream. Input stream needs to implement Stream.Readable interface
// 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)
xlsxWriter.setInputStream(inputStream);
// Get output stream. This will return a stream of XLSX file data.
const xlsxStream = xlsxWriter.getOutputStream();
// do something with the output, like write it into file or send it as HTTP response
const writeStream = fs.createWriteStream('file.xlsx');
xlsxStream.pipe(writeStream);
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
```

@@ -37,0 +30,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc