0.5.1 • Published 5 years ago

xlsx-to-json-lc-hoffer v0.5.1

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

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

0.5.1

5 years ago

0.5.0

5 years ago