Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-xlsx-parser

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-xlsx-parser

Seamless convert xlsx to json with optional option to lowerCase the excel headers (Credits rahil471/node-xlsx-json library)

  • 0.3.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

node-xlsx-parser

Converting xlsx file to json or csv files using nodejs. Long story short, our commercial project needed lightweight, pretty simple and up-to-date tool for converting btw XLSX/CSV/JSON. So, came here to share it with you guys.

Install

NPM

  npm install node-xlsx-parser

Yarn

  yarn add node-xlsx-parser

Usage

  XLSXParser = require("xlsx-to-json");

  const jsonFromXLSX = new XLSXParser()
  .xlsx_to_json(
    input, // file/blob/base64/string/array/buffer as xlsx to convert to json
    options // options from require('xlsx').xlsx_to_json()
  );

  const csvFromXLSX = new XLSXParser()
  .xlsx_to_csv(
    input, // file/blob/base64/string/array/buffer as xlsx to convert to json
    options // options from require('xlsx').xlsx_to_csv()
  );

  const jsonFromCSV = new XLSXParser()
  .csv_to_json(
    input, // file/blob/path as xlsx to convert to json
    options // options from require('xlsx').xlsx_to_csv()
  );

  const CSVFromJSON = new XLSXParser()
  .json_to_csv(
    input, // JSON/JSONB file with object for translate to CSV
    options // options from require('xlsx').json_to_csv()
  )

  const {
    result: string, // csv or json formatted string
    error: string, // reason of the failure
  } = jsonFromXLSX || csvFromXLSX || jsonFromCSV;

Thoughts

Feel free guys, to share you PRs to develop branch with some proposals. I will greetely review all of them as soon as I can for sure)

License

MIT @dkfl1995

Keywords

FAQs

Package last updated on 31 Jul 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc