Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading a CSV file into an array
Message
 
To
29/11/2001 11:57:12
John Marrone
Bloodstock Research Inc.
Lexington, Kentucky, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00587527
Message ID:
00587554
Views:
40
The following will parse a comma separated string with quotes into an array -
lcStr = ["one","two","three","four"]
lnitems = ALINES(laItems, CHRTRAN(CHRTRAN(lcstr, ["], ""), ",", CHR(13)))
HTH

Dan

>I need to read a comma seperated text file with quotes around strings.
>Each record has 1500 fields. Since VFW tables can have only 255 fields I
>need to read this file I quess byte by byte into an array, then assign to
>different tables the data I need. Could someone explain to me the best way
>to do this. I did it by useing FileToStr and then did a substr loop to read
>each character and pharsed the filethat way. It took forever to complete the
>process. The average file is about 500k. Thank you in advance for any help.
>I am starting a very data intensive project that will proably take over a year
>todo. I can do this easlie in VB. But don't know the best way in VFW.
>
>Thanks
>John Marrone
>Bloodstock Research Inc.
>jmarrone@brisnet.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform