You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

xlsx-to-json-lc

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xlsx-to-json-lc

Convert xlsx to json with optional option to lowerCase the excel headers (Credits DataGarage Fork)

0.5.0
latest
Source
npmnpm
Version published
Weekly downloads
1.2K
-7.24%
Maintainers
1
Weekly downloads
 
Created
Source

node-xlsx-json

Build Status

Converting xlsx file to json files using nodejs. This is a fork of DataGarage module with additional option of converting excel headers to lowerCase as json keys.

Install

  npm install xlsx-to-json-lc

Usage

  xlsxj = require("xlsx-to-json");
  xlsxj({
    input: "sample.xlsx", 
    output: "output.json",
    lowerCaseHeaders:true //converts excel header rows into lowercase as json keys
  }, function(err, result) {
    if(err) {
      console.error(err);
    }else {
      console.log(result);
    }
  });

Specifying a target sheet

You can optionally provide a sheet name to extract from that sheet

  xlsxj = require("xlsx-to-json");
  xlsxj({
    input: "sample.xlsx", 
    output: "output.json",
    sheet: "tags"
  }, 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

FAQs

Package last updated on 30 Aug 2017

Did you know?

Socket

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