Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File txt, csv
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00416858
Message ID:
00416993
Vues:
23
>how can I create a file csv with headers from vfp6.0 or to make a file txt for import it to any software. The software that I'm using is windowbook( Postal Post Office) and it requeries an import file. I used "Copy to (.txtfilename.value) type DELI" but when it maps the fields it does it with the first record wich is data and it doesn't match with the fields that it receives. Thanks a lot.

If the first record has to be the field name list, you could:
use mydata
copy to textfile.csv deli
lcTemp = filetostr('textfile.csv')
lcHeader = ""
for i = 1 to fcount()
    if not empty(lcHeader)
       lcHeader = lcHeader + ',"' +field(i) + '"'
    else
       lcHeader = '"' + field(i) + '"'
    endif
endfor
lcTemp = lcHeader + chr(13) + lcTemp
strtofile(lcTemp, 'textfile.csv')
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform