Socket
Socket
Sign inDemoInstall

@iamstarkov/xlso

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @iamstarkov/xlso

Node.js package for parsing an excel workbook to an javascript object


Version published
Weekly downloads
2
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Known Vulnerabilities bitHound Overall Score bitHound Code bitHound Dependencies

xlso

Node.js package for parsing excel workbooks into an Javascript array of rows. Excel workbooks based on the node.js package xlsx.

how to install the xlso?

$ npm install xlso --save

How to use the package?

Let suppose the following table is saved as testdata.xlsx.

IdNameCity
1MickyLoum
2LapiroMbanga

The following snippet show how to parse testdata.xlsx in order to get all data.

var xlso = require('xlso');
var xlsx = require('xlsx');
// the xlsx's workbook to parse by the xlso package.
var workbook = xlsx.readFile("testdata.xlsx");
// parse the workbook to a js array
var rows = xlso.parseWorkbook(workbook, 0, 0);
// display your js array
rows.forEach(function(item, index){
  console.log("Id: " + item.Id + ", Name: " + item.Name + ", City: " + item.City);
});

API Specifications

xlso expose one API that expect three parameters:

  • the first parameter is the workbook that was generated by the package xlsx (see section below).
  • the second parameter is the position of the sheet in the given workbook (the index 0 is the first sheet).
  • the third and last parameter is the position of the header row (position 0 means also first row).

PS: the header row must be the first row.

How to run unit-tests?

$ npm test

Keywords

FAQs

Last updated on 26 Aug 2019

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