Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Export data in a view or cursor
Message
De
07/03/2000 20:27:51
 
 
À
07/03/2000 20:05:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00343052
Message ID:
00343072
Vues:
14
>I need to export data in a view or cursor to comma seperated or excel format. The "export" and "copy to" commands only let me do it from a single table. Is there any other command in VFP that will let me do that. Or is there a piece of code (a vcx or ActiveX control) that anyone know of that can export the data from a view or cursor.
>

You can explicitly name fields or specify inclusion/expclusion masking using the FIELDS statement, and the source may be a cursor or view constructed and in use in the current work area. The following uses the LABELS table from the VFP directory to construct an SDF and a CSV text file from a cursor:
select * from labels into cursor temp where ckval <10000 nofilt
? ALIAS()  && just to prove the cursor is in use
copy to temp.txt type SDF
copy to temp.csv type CSV
Any cursor or view in use in the current work area can produce the output. It is not limited to working with physical tables.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform