alchemical
alchemical

Reputation: 13985

What is the best 3rd party component for importing flat files using C#?

Just looking for a component that can be programmatically called in a fairly simple way to import a flat file of data. The data is typically 100,000-500,000 rows, each row contains about 200 fields of text anywhere from about 5 to 250 characters long. Data could be CSV, tab-delimited, etc.

There is some budget for this, but would like to stay pretty cheap if possible.

Upvotes: 0

Views: 393

Answers (3)

alchemical
alchemical

Reputation: 13985

This code project seems to work great!

Upvotes: 0

Reed Copsey
Reed Copsey

Reputation: 564413

The .NET Framework is pretty good at reading flat text files, without any 3rd party components. TextFieldParser, for example, handles this incredibly well, and is part of the framework. (And yes, you can use it in C#, even though it's in the VB namespace...)

I recommend reading Deborah Kurata's articles on "Reading Comma Delimited Values" (plus part 2 using TextFieldParser) and "Reading Fixed Length Values". They cover this topic in detail.

Upvotes: 4

SLaks
SLaks

Reputation: 887423

Try FileHelpers, which is open source.

I don't have any experience with it, though.

Upvotes: 5

Related Questions