开发者

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

开发者 https://www.devze.com 2022-12-22 11:48 出处:网络
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

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.


Try FileHelpers, which is open source.

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


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.


This code project seems to work great!

0

精彩评论

暂无评论...
验证码 换一张
取 消