Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert corrupt csv to fixed width SDF
Message
 
 
À
19/12/2005 19:58:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01079385
Message ID:
01079395
Vues:
17
This message has been marked as a message which has helped to the initial question of the thread.
Hi Jim,

I'm not sure why you want fixed length file as result. Would be cleaning up csv file enough? See if Re: Append from Message #1045090 helps.

>We are having problems with a daily import we get from one of our clients that is in a csv file. I decided to attempt converting it to fixed-width, based on the expected number of fields per record, and the structure of that record; see experimental program below. I have a record with 13 fields and each has a specified width in the function "myline" below.
>
>What this program achieves:
>1. Eliminates the problem of extra linefeeds breaking a record in the csv.
>2. Eliminates the problem of extra double quotes within a field breaking the integrity of a record within a row.
>
>Where it fails:
>This program works, but is too inefficient for actual use. It slows down as it gets further into the file.
>

<snip>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform