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

calculations-json

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

calculations-json

Parser module for the XLS / XLSX / CSV formats into plan JSON

  • 1.4.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

CALCULATIONS JSON

Introduction

Calculations JSON is made to simplify parse process for the following files:

  • XLS
  • XLSX
  • CSV

That extensions works perfectly and on that extensions it has been tested out.

Installation

To install that module just type:

npm install calculations-json

After that just import that module:

const calculations = require('calculations-json');

Getting started

To start using that module You will have to specify which file do You want to parse and convert into the JSON format.

There are 3 possibilities for now:

calculations.xlsToJson(config);
calculations.xlsxToJson(config);
calculations.csvToJson(config);

Configuration for that will be as following:

const config = {
  input: {
    type: 'file | stream',  // stream or file (default 'file')
    path: 'path to file',   // relative path to the file
    delimiter: ';'          // delimiter (default ';')
  },
  options: {
    headerLine: 0,          // header line number
    contentStartsAt: 1      // line from where the content starts
    headerAsKey: false      // if want selected header to be the keys
    xlsSheetName: null     // for xls and xlsx provide sheet name or the first one will be taken
  },
  excludedLines: [0,1]      // lines to exclude
};

Roadmap

[X] Prepare output mechanisms
[X] Make the output fully configurable

Credits

© by Mike Makowski (2018)

Portfolio: MMakowski.Online
LinkedIn: WebEferen

FAQs

Package last updated on 23 Oct 2018

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