Socket
Socket
Sign inDemoInstall

@peacechen/xls-to-json

Package Overview
Dependencies
2
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @peacechen/xls-to-json

Converting xls file to json files using nodejs


Version published
Weekly downloads
178
decreased by-41.06%
Maintainers
1
Install size
8.92 MB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 08 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc