Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including xlsx-to-json-lc with all npm packages installed. Try it out:

var xlsxToJsonLc = require("xlsx-to-json-lc")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

xlsx-to-json-lc v0.5.0

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

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

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free