CSV splitter (divide large CSV files)


Hello everyone,

Well scorpion provided me with a 2Gb file of tick data of EUR/USD sinc 1998 I believe. I know that MetaTrader and my computer itself cannot support that much memory (I have 1GB of RAM). So I was wondering if there was any way to chop up the file to get different files to be able to import into MetaTrader or at least test them one by one.

Thanks for your time everyone,


I know MS VS .NET 2003 can handle files that big and split them. Then you can import them into MT one slice at a time. PS: You may need to use some Find&Replace, as the CSV may not be in the same format as MT. Another oppion is write a program to do it. Steven

Maybe a program already exists, I know file splitters exist but they end up with .01 and .02 files If anyone finds program to divide a .csv file per x lines then that would be awesome to use.

By the way I have 0 experience in Java, VB, C, C++ I just know the basic html and some php but even that most of the time i look up online.

Any help is greatly appreciated


I've just written the CSV Splitter for you, as I think it might come in handy someday.

Download: csv-splitter-1.1.zip

Downloaded: 1398 times (Oct 18 2007)

I've attached the compiled exe along with source code. To run the exe, you will need .Net Framework Version 1.1 installed in prior.


1. Fill in necessary information:

CSV file: the path to the CSV that you wanted to split.

Number of lines: the maximum number of lines/rows in each splitted piece.

Max Pieces: limit the number of output files. '0' is unlimited.

2. Click "Split Now!", and that's it. You can find the splitted pieces in the a new folder of the same directory of the CSV file.


Thanks scorpion, I'll try it tomorow when I have time, it's really incredible how quick one can program such a useful tool.


You're welcome!

Now I've just fixed a few minor bugs in version 1 and added Abort Splitting feature. You can download CSV Splitter version 1.1 from my first post. Enjoy!


Hey Hallo. You're welcome!

Drop me a line if you have any problem with the app.


Hi all, I'm new here and couldn't find the Chit Chat forum to say hi , so I figured let me do so here and simultaneously say thank you to scorpion for the cvs splitter file. Very very helpful to me.

So hi all , and thanks scorpion .


The CSV splitter is pretty good. However, I have a CSV file with 750,000 lines. The CSV splitter stops at 350,000.

Any way to make it go to 750,000?

Alternatively is there a way to make the CSV splitter delete rows that have been split to a file?

thanks for you help -- and Scorpion.. great great program.