Reading CSV files

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
hi friends

I had a question regarding csv file reading...

Actually i am retrieving my contact address list from yahoo mail, which give response in csv format


The
problem is, when we add address in yahoo with "new line feed"(or enter
key press), i get the csv contains rn within the quotes. for ex:

Name",".","L","pnl"," mailto:plbro@gmail.com plbro@yahoo.com ","Friend",  ...[more info]....      "Houseno
 Streetname","city","State",<wbr>"pin","India","DOB","","","","<wbr>","","some notes","","","","","","","",""<wbr>,"","","","","","","",""

[it is similar for gmail also]
It must comes in single line but line breaks after houseno(in ex)which csv consists

"houseno rn Streetname"   and finally rn is also in end of the line

I
cant directly remove rn, b/c i read the csv Line by line ... so how
to remove rn which are only in double quotes like address fields

how can i get rid of this?  is it any regular expressions to parse this?

thnx in Advance

View the full article
 
Back
Top