Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting columns in Excel
Message
 
 
À
17/06/2007 12:41:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 7
Divers
Thread ID:
01233797
Message ID:
01233800
Vues:
8
The COPY TO command does not support 'AS' clause in the field list. You can modify CSV file after creating it. Something like (untested)
lcFileName = "mycsvfile.csv"
COPY TO (lcFileName) FIELDS uic, para, lineno CSV
lcStr = FILETOSTR(lcFileName)
lcOldName = "lineno"
lcNewName = "line#"
lnPos = ATC(lcOldName, lcStr) 
lcStr = STUFF(lcStr, lnPos, LEN(lcOldName), lcNewName)
STRTOFILE(lcStr, lcFileName)
Or you can use COPY TO...DELIMITED to create a file w/o header row and than add teh header row.
>
>I am attempting to run the follwing program :
>COPY TO mycsvfile.csv FIELDS uic, para, lineno csv
>
>The problem is that I would like to run the following line of code but it's giving me syntax error:
>
>COPY TO mycsvfile.csv FIELDS uic, para, lineno as line# csv
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform