@sandersland/csv-splitter
v1.1.9
Published
Command line utility for splitting CSV files
Downloads
4
Readme
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