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.

You may also like

Modified properties in LINQ to SQL

I’ve been recently quite surprised to learn that there is no way to tell whether an entity property in LINQ to SQL is updated or not. Sometimes it’s necessary to know which properties are updated before you pass them to the database context for submission. For example in ASP.NET MVC  there might be HTTP POST actions which accept your model object as an action parameter.

Keep Reading

SharePoint backup script using PowerShell

Keep Reading

Newsletter sign up

Every couple of months we send out an update on what's been happening around our office and the web. Sign up and see what you think. And of course, we never spam.