csv-combiner
asynchronous read multiple csv files line by line and combine columns into one file
Last updated 3 years ago by arturowin .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install csv-combiner 
SYNC missed versions from official npm registry.

Build Status

Combines multiple CSV files merging chosen columns

Instalation

npm install csv-combiner

Test

npm test

Example: combine two CSV files

Dataset_1.csv:

City,State,Country,
Yerevan,Yerevan,Armenia
Yerevan,Yerevan,Armenia
Yerevan,Yerevan,Armenia

Dataset_2.csv:

First Name,Last Name,Age
Arthur,Arakelyan,25
Sipan,Margaryan,26
Davit,Tovmasyan,25

usage:

const combiner = new csvCombiner('/exportDir');
    combiner.combine([{filePath: '/files/Dataset_1.csv',columns: [0,1,2]},
                      {filePath: '/files/Dataset_2.csv',columns: [0,1,2]}
        ]).subscribe(
            filePath => {
               //do whatever you want
            },
            error => {
               //do whatever you want
            }
        )

combined_dataset.csv

City,State,Country,First Name,Last Name,Age
Yerevan,Yerevan,Armenia,Arthur,Arakelyan,25
Yerevan,Yerevan,Armenia,Sipan,Margaryan,26
Yerevan,Yerevan,Armenia,Davit,Tovmasyan,25

Current Tags

  • 1.0.3                                ...           latest (3 years ago)

4 Versions

  • 1.0.3                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (4)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |