Splitting converted txt file from a csv file with 2 million rows

I have a csv file with 2 million rows of transaction and I convert it to text file.

Is there a way I can split the converted text file into 1 million transaction rows or an N value of transaction rows?

  1. use read text file to read text file to string variable e.g. txt
  2. assign transactionData = System.Text.RegularExpressions.Regex.Split(txt, environment.NewLine)
    where transactionData = array of string

transactionData will become the N value of transaction rows

1 Like

Sorry, where is the splitting part?

this is the splitting part

1 Like

I mean the converted text file has 2 million transaction rows and I want to split it into 2 or N files.

so if it is 2 splits, the expected output is 2 files with 1 million transaction rows each file.

use this
test11.xaml (10.7 KB)
example:
image
set split count here


result
image

1 Like