{"id":893,"date":"2016-01-24T13:50:19","date_gmt":"2016-01-24T03:50:19","guid":{"rendered":"http:\/\/www.moneystock.net\/wp_e\/?p=893"},"modified":"2016-01-24T14:27:37","modified_gmt":"2016-01-24T04:27:37","slug":"csv-library-to-use","status":"publish","type":"post","link":"https:\/\/moneystock.net\/wp_e\/2016\/01\/24\/csv-library-to-use\/","title":{"rendered":"CSV Library to use"},"content":{"rendered":"<p>At first, I used custom built CSV helper class, which simply separates CSV formatted string with a comma and push the data into DataTable. However, this class didn&#8217;t handle double quotation qualifier well enough.<\/p>\n<p>So, I started searching for a CSV library.<\/p>\n<p>One reliable and mostly recommended CSV library was <a href=\"http:\/\/www.codeproject.com\/Articles\/9258\/A-Fast-CSV-Reader\">A Fast CSV Reader<\/a>\u00a0(aka\u00a0<a href=\"http:\/\/nugetmusthaves.com\/Package\/LumenWorks.Framework.IO\">LumenWorks.Framework.IO<\/a>)\u00a0by\u00a0<a href=\"http:\/\/www.codeproject.com\/script\/Membership\/View.aspx?mid=265029\" rel=\"author\">Sebastien Lorion<\/a>, but it&#8217;s not maintained by\u00a0Paul Hatcher in <a href=\"https:\/\/github.com\/phatcher\/CsvReader\">Github Repo<\/a>\u00a0in the name of CsvReader.<\/p>\n<blockquote><p>The <a href=\"https:\/\/www.nuget.org\/packages\/LumenWorksCsvReader\/\">CsvReader<\/a> library is an extended version of Sebastian Lorien&#8217;s <a href=\"http:\/\/www.codeproject.com\/Articles\/9258\/A-Fast-CSV-Reader\">fast CSV Reader<\/a> project and provides fast parsing and reading of CSV files<\/p>\n<p>by &#8211;\u00a0Paul Hatcher<\/p><\/blockquote>\n<p>This was quite good, until I found<\/p>\n<ol>\n<li>CsvReader does not returns the correct row there the CSV format is broken<\/li>\n<li>When there is CR\/LF in the middle of CSV data, this library cannot handle it even though the CR\/LR is wrapped by double quotation qualifier.<\/li>\n<\/ol>\n<p>The next one I&#8217;ve chosen is\u00a0<a href=\"http:\/\/www.csvreader.com\">DataStreams framework<\/a>, which can cope with CR\/LF in CSV data. Unfortunately, this isn&#8217;t open-source. \u00a0I&#8217;m happy with DataStreams up until now.<\/p>\n<p>Hope to find open source CSV libary that is as stable as DataStreams.<\/p>\n<p>Still, I&#8217;m using my first CSVHelper class as a facade \/ wrapper class for these 3rd party library so as to separate the concern as we normally do.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At first, I used custom built CSV helper class, which simply separates CSV formatted string with a comma and push the data into DataTable. However, this class didn&#8217;t handle double quotation qualifier well enough. So, I started searching for a CSV library. One reliable and mostly recommended CSV library was A Fast CSV Reader\u00a0(aka\u00a0LumenWorks.Framework.IO)\u00a0by\u00a0Sebastien Lorion,&hellip; <a class=\"more-link\" href=\"https:\/\/moneystock.net\/wp_e\/2016\/01\/24\/csv-library-to-use\/\">Continue reading <span class=\"screen-reader-text\">CSV Library to use<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[203],"tags":[184,95,204,205,208,207,206],"class_list":["post-893","post","type-post","status-publish","format-standard","hentry","category-library","tag-net","tag-c","tag-csv","tag-csv-reader","tag-datastreams","tag-paul-hatcher","tag-sebastien-lorion","entry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/moneystock.net\/wp_e\/wp-json\/wp\/v2\/posts\/893","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/moneystock.net\/wp_e\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/moneystock.net\/wp_e\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/moneystock.net\/wp_e\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/moneystock.net\/wp_e\/wp-json\/wp\/v2\/comments?post=893"}],"version-history":[{"count":4,"href":"https:\/\/moneystock.net\/wp_e\/wp-json\/wp\/v2\/posts\/893\/revisions"}],"predecessor-version":[{"id":897,"href":"https:\/\/moneystock.net\/wp_e\/wp-json\/wp\/v2\/posts\/893\/revisions\/897"}],"wp:attachment":[{"href":"https:\/\/moneystock.net\/wp_e\/wp-json\/wp\/v2\/media?parent=893"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/moneystock.net\/wp_e\/wp-json\/wp\/v2\/categories?post=893"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/moneystock.net\/wp_e\/wp-json\/wp\/v2\/tags?post=893"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}