Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to access excel chart from VFP
Message
 
To
15/01/2003 14:07:44
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00742052
Message ID:
00742223
Views:
19
>I have a excel file containing chart. How can I call this file from form and display it?
>Thank you.

I have not done this for a couple of years. You start an Excel automation session (you could leave visible false). The worksheet would be opened. The chart would be copied. And then something like a paste special would put it in your container.

I recordered an Excel macro to get the VBA for the chart copy. Providing we have a VFP Excel Automation running and the work sheet with the chart is the Active sheet:
oExcel.ActiveChart.ChartArea.Select
oExcel.ActiveChart.ChartArea.Copy
Then close the automation (if you need too) and paste special the contents of the clipboard to your VFP container. There are other image handling commands in VFP - you might look at those too.
Imagination is more important than knowledge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform