Socket
Socket
Sign inDemoInstall

node-excel-to-json

Package Overview
Dependencies
6
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-excel-to-json

convert a spread sheet into JSON into tabular form


Version published
Weekly downloads
1.2K
decreased by-18.87%
Maintainers
1
Install size
11.5 MB
Created
Weekly downloads
 

Readme

Source

Excel2JSON

Turn any xls or xlsx file into a clean JSON file or Javascript Object. This module is npm module 'XLXS' Pure-JS cleanroom implementation from official specifications and related documents.

Supported read formats:

  • Excel 2007+ XML Formats (XLSX/XLSM)
  • Excel 2007+ Binary Format (XLSB)
  • Excel 2003-2004 XML Format (XML "SpreadsheetML")
  • Excel 97-2004 (XLS BIFF8)
  • Excel 5.0/95 (XLS BIFF5)
  • OpenDocument Spreadsheet (ODS)

Install

$ npm install node-excel-to-json

Usage

excel2Json(fileName, [options], callback)

Where

  • fileName relative path of Excel file.
  • options is a optional args { convert_all_sheet: true, return_type: 'File', sheetName: '' }
    • convert_all_sheet If this value is false, Then one sheet will processed which name would be provided
    • return_type Two type of return type 'File' or 'Object'
    • sheetName Only if convert_all_sheet=false
  • callback is the callback to run - callback(error, output)

Example

var excel2Json = require('excel2json');

excel2Json('sample.xls', function(err, output) {

});

excel2Json('../test/sample.xls', {
    'convert_all_sheet': false,
    'return_type': 'File',
    'sheetName': 'survey'
}, function(err, output) {

});

Keywords

FAQs

Last updated on 31 Jul 2016

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