Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP&MS Excel
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01014374
Message ID:
01014601
Views:
17
>I need to create a sheet of MS Excel starting from a table of VFP, is it necessary that from my program me can run MS Excel, besides creating the columns and headers of the same ones How I can make it?

As others have said in this thread, depending on what you want to accomplish, it may as simple as doing a COPY TO myfile.xls TYPE XL5. One thing I normally do after that, as XL5 uses a driver for an older version of Excel, is to open the created file using automation with oExcel=CreateObject("Excel.Application") then manipulate it by changing the column names to captions (instead of field names), autosizing all columns, changing column formats, and basic pretty-up stuff, then doing an oExcel.SaveAs() to save it with the current version of Excel in use.

For automation examples, you can check the article Hillmar mentioned (also available in Spanish) or check my example at the Wiki (http://fox.wikis.com/wc.dll?Wiki~AutomationExamples) or just ask here if you get stuck on any particular command.


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Reply
Map
View

Click here to load this message in the networking platform