Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reading a CSV file into an array
Message
 
À
29/11/2001 11:57:12
John Marrone
Bloodstock Research Inc.
Lexington, Kentucky, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00587527
Message ID:
00587554
Vues:
43
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform