@sandersland/csv-splitter

1.1.9 • Public • Published

csv-splitter

csv-splitter is a command-line tool to split large CSV files into smaller files with a specified maximum number of rows.

Usage

csv-splitter [options] <inputFilePath>

Options

  • -h, --help: Display the help message.
  • -o, --output <path>: Specify the output directory path (default: current directory).
  • -m, --max <integer>: Specify the maximum number of rows for each CSV file (default: 5000).
  • -n, --name <string>: Specify the desired name of your CSV files.

Description

csv-splitter is a command-line tool to split large CSV files into smaller files with a specified maximum number of rows. If the input file has more rows than the specified maximum, it splits the file into multiple CSV files, each containing the maximum number of rows.

Examples

Split data.csv into smaller CSV files with a maximum of 1000 rows per file:

csv-splitter -m 1000 data.csv

Split data.csv into smaller CSV files in the 'output' directory with a maximum of 500 rows per file:

csv-splitter -o output -m 500 data.csv

Split data.csv into smaller CSV files in the 'output' directory with a custom name and a maximum of 500 rows per file:

csv-splitter -o output -n file.csv -m 500 data.csv

Installation

Install Globally from NPM.

npm i -g @sandersland/csv-splitter

csv-splitter -h

Dependents (0)

Package Sidebar

Install

npm i @sandersland/csv-splitter

Weekly Downloads

1

Version

1.1.9

License

ISC

Unpacked Size

9.82 kB

Total Files

6

Last publish

Collaborators

  • sandersland