Well, I admit I regularly write a custom CSV parser for a particular task/project. Every time I do it I think it’ll be quicker/safer to do it right now in 30-40 minutes rather than to spend time exploring Web in search for a reliable and flexible parser.
We used to use Microsoft Jet OleDB provider for the purpose of parsing CSV files until we realised it may “hang” until IIS Application Pool is restarted. It doesn’t happen too often however when it does, it’s always very annoying to know that it brought so many troubles again.
Just in the last 2 weeks I happened to write 2 custom CSV parsers for different projects. With the last one when I “almost” finished I realised I just cannot go on like that any more - I’m sick and tired reinventing the wheel.
The purpose of this blog is to spread the word about a great CSV parser I found: http://www.filehelpers.com/ It’s really feature rich, reliable and easy to use, certainly worthwhile to try. I’m happy I found it. The only issue I experienced with it was that it worked inconsistently wit large files (~250MB in my case) occasionally throwing OutOfMemory exception. I managed however to solve it by feeding the parser with parts of the file.