Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Appending .txt files without spaces.
Message
 
À
08/05/2001 11:04:23
Jorge Villasenor
Luz y Fuerza Del Centro
Mexico City, Mexique
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00504731
Message ID:
00504734
Vues:
17
>I have this .txt file with 5 columns of info, it is delimited with blanks, each record is something like this:
>
>"NA048032 <20 spaces> 040502010100 <15 spaces> 000800 <20 Spaces> A05075300 <5 spaces> 00DIN"
>
>when using:
>
>APPEND FROM file.txt DELIMITED WITH BLANK
>
>I need to have a table with enough columns for every space in the record!!!
>
>Question: How can i ignore those nasty spaces?

If the fields do not contain any spaces then using CHRTRAN() to eliminate them and then a straight append TYPE SDF will work.
lcoldtext = FILETOSTR("oldtext.txt")
= STRTOFILE(CHRTRAN(lcoldtext, SPACE(1), ""), "newtext.txt")
APPEND FROM newtext.txt TYPE SDF
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform