Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem CSV File
Message
De
04/10/2007 07:46:23
 
 
À
04/10/2007 07:24:41
Neil Mc Donald
Cencom Systems P/L
The Sun, Australie
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:
01258463
Vues:
24
>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?
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform