Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem CSV File
Message
De
04/10/2007 22:12:39
Neil Mc Donald
Cencom Systems P/L
The Sun, Australie
 
 
À
04/10/2007 08:03:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01258459
Message ID:
01258793
Vues:
18
Thanks Tez,
I've tried all of your suggestions, the Append From doesn't import into Memo's and also starts at record 2.
Sergey's suggestion looks like it will do the trick.

Thanks anyway.

>Geez! Some spreadsheet that makes!
>
>FREAD( nFileHandle, nBytes)
>
>I don't know what the limitation of nBytes is.
>Not sure if it truncates to the actual length of the line, even if not as long as nBytes.
>AM I barking totally up the wrong tree here? Have you tried it?
>
>Also, how do you import: with IMPORT or APPEND from DELIM?
>
>There is the:
>
>Append from srcFile Delimited with , with character CR
>
>permutation to try (just a serving suggestion here - not sure how that fits in with your char).
>
>>Hi Tez,
>>They are variable length records, from 40 to 2000 bytes.
>>
>>>>Hi,
>>>>I am trying to code an import of a non standard CSV file.
>>>>The data starts at line 1 of the file.
>>>>The main problem is the second field contains commas & Carriage return line feed pairs within it and can be from 10 to 1200 characters in length.
>>>>
>>>>I have listed some sample data below.
>>>>
>>>>
>>>>"AA0001","AA0001 has the following classes, <CR><LF>1. Class1<CR><LF>2. Classes 2, 3 & 4<CR><LF>Blah Blah","600.00",60,,"AA001"<CR>
>>>>"AA0002","AA0002 has the following class, <CR><LF>1. Class1<CR><LF>Blah Blah","700.00",50,,"AA002"<CR>
>>>>
>>>>
>>>>Does anyone have any code on how to import the second field as FGETS truncations at the first and I need to import it into a Memo field
>>>>
>>>>Thanks in advance
>>>
>>>Neil
>>>
>>>Have you tried FREAD(), where you can specify the no. of bytes to return, rather than it finishingf at the 1st CR it finds?
Regards N Mc Donald
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform