Skip to main content

Split CSV

Splits a CSV file into smaller files based on the maximum number of rows specified.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If ContinueOnError property is true, no error is caught when the project is executed even if Catch node is used.

Input

  • File Path - Path of the CSV file to split.
  • Max Rows - The maximum number of rows that each split file should contain.

Output

  • Out Directory - Path of the directory where the split files are saved.

Options

  • Separator - The separator used in the CSV file. Comma (,) or Semicolon (;).
  • Headers - Specify whether the CSV includes headers.

Example

Suppose you have a large CSV file called data.csv that contains 1000 rows and you want to split it into smaller files that contain a maximum of 100 rows each. You would use the following configuration:

  • File Path - "C:\myfolder\data.csv"
  • Max Rows - 100
  • Out Directory - "C:\myfolder\out"
  • Separator - ,
  • Headers - true

After the node has executed, you will have 10 split files in the "C:\myfolder\out" directory, each containing 100 rows, except for the last file which will contain the remaining rows. The split files will be named data-000.csv, data-001.csv, ..., data-009.csv.