csv-splitter is a command-line tool to split large CSV files into smaller files with a specified maximum number of rows.
csv-splitter [options] <inputFilePath>
-
-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.
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.
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
Install Globally from NPM.
npm i -g @sandersland/csv-splitter
csv-splitter -h