Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy To Command
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00249759
Message ID:
00249771
Views:
15
>I am using the copy to command to save a cursor as an excel file. The only problem is that when I save it, the excel file contains the field headers along with the data in the fields.
>Is there anyway around this?

I don't know if it can be done directly with COPY TO, since that's by design - usually people want column headers to identify data. But, here are a couple ideas to control the transfer. You can use OLE automation server, and commands like:

_VFP.DataToClip(,,3)
...
oRange.PasteSpecial()

to move only those rows you want using Range(). Alternatively, you can use COPY TO, then open the file in Excel with automation, and delete row 1 from vfp.
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Reply
Map
View

Click here to load this message in the networking platform