csv-excel-to-json

1.0.1 • Public • Published

csv-excel-to-json

Introduction

Module to convert CSV or Excel file to JSON output

Code Samples

syntax

convertToJson(input, output, optionalConfig);

usage

var csvOrExcel = require('csv-excel-to-json'); 

csvOrExcel.convertToJson("D:\\ng\\sample.csv", "D:\\ng\\sample.json");  
csvOrExcel.convertToJson("D:\\ng\\sample.xls", "D:\\ng\\sample-xls.json", {ignoreEmpty: false});  

default configuration

{
        delimiter: ',',   // for CSV
        ignoreEmpty: true,
        sheetNumber: 0 // In case of Excel file
}

Installation

npm install csv-excel-to-json --save

Readme

Keywords

Package Sidebar

Install

npm i csv-excel-to-json

Weekly Downloads

3

Version

1.0.1

License

ISC

Last publish

Collaborators

  • kaushilcr