>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()
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.