.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

CSV Paraser ?

Posted By:      Posted Date: September 18, 2010    Points: 0   Category :ASP.Net
I get csv files from clients which I need to read, test data then import. All this is done, however, I do have one sticking point which I just dont seem to be able to get around. Do While Not ImportFile.EndOfStream ImportLine = ImportFile.ReadLine LineArray = Split(ImportLine, ",") If LineArray.GetUpperBound(0) > 0 Then Begin() ' My code here End End If Loop ImportFile.Close()  Problem is when there is a comma in the middle of a field. I have been looking at the csv prasers on the net but dont seem to be able to find anything that will return back to LineArray. This line works fine : "11-22-33","12345678","360","REF0001","1.00","17" This line causes problems: "22-22-22","87654321","A,N OTHER","REF0002","1.00","17" Unfortunatly I am not permitted to remove the quote within the file any suggestions

View Complete Post

More Related Resource Links

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend