Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to access excel chart from VFP
Message
 
À
15/01/2003 14:07:44
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00742052
Message ID:
00742223
Vues:
20
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform