1.0.0 • Published 7 years ago

xlsx-to-json-2 v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

node-xlsx-json

Build Status

Converting xlsx file to json files using nodejs

Install

  npm install xlsx-to-json

Usage

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