Search code examples
c#csv

What library to use for CSV import in c#


I've looked at FileHelpers v2.0 but there is a serious problem woth that. I cannot define a class that maps to the record in the source/detination file.

The reason is I don't know what file I'm going to get. A big part of my program is mapping the file's fields to the database's fields... I don't know how many fields there wil be, nor wich will need to be imported.

I have no intention on rolling my own lib, especially since I have no control over the files that are going to be fed to my program.

Any solutions tot his?

Dennis


Solution

  • Check out the Fast CSV reader on the CodeProject. It helped me with my project a while ago. Its really easy to use, and is quite good.