2.1.2 • Published 6 months ago

@peacechen/xls-to-json v2.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

node-xls-json

npm version

Convert xls files to JSON in NodeJS

Republishing Notes

This is a fork of the unmaintained xls-to-json package. The purpose of this repo is to unlock the dependencies, specifically xlsx, to use the latest published version @e965/xlsx . Contact me if you would like to be added as a maintainer. Original documentation follows...

Install

npm i xls-to-json

Usage

node_xj = require("xls-to-json");
node_xj(
	{
		input: "sample.xls", // input xls
		output: "output.json", // output json
		sheet: "sheetname", // specific sheetname
		rowsToSkip: 5, // number of rows to skip at the top of the sheet; defaults to 0
		allowEmptyKey: false, // avoids empty keys in the output, example: {"": "something"}; default: true
	},
	function (err, result) {
		if (err) {
			console.error(err);
		} else {
			console.log(result);
		}
	}
);

In config object, you have to enter an input path. But If you don't want to output any file you can set to null.

License

MIT @chilijung

2.1.3

5 months ago

2.1.2

6 months ago