Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to copy an Excel Chart and save it as JPG/GIf
Message
 
À
02/06/2003 19:55:58
Peter Wagner
Point Informática Ltda.
Limeira, Brésil
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00795319
Message ID:
00795488
Vues:
26
Peter, if Export method will not work to your expectation, I can only help you with a procedure that saves Clipboard data to *.emf file. Unfortunately I have no routines available for converting EMF data to JPEG or GIF.

Check Export method description from Excel VBA Help.

* * *
Export Method
Exports the chart in a graphic format.
expression.Export(FileName, FilterName, Interactive)
expression
Required.
An expression that returns a Chart object.

FileName
Required String.
The name of the exported file.

FilterName
Optional Variant.
The language-independent name of the graphic filter as it appears in the registry.

Interactive
Optional Variant.
True to display the dialog box that contains the filter-specific options. If this argument is False, Microsoft Excel uses the default values for the filter. The default value is False.

Example
This example exports chart one as a GIF file.
Worksheets("Sheet1").ChartObjects(1) _
.Chart.Export _
    FileName:="current_sales.gif", FilterName:="GIF"
* * *
I guess you can suppress that dialog by setting Interactive to False. And I do believe that FileName parameter can be a full path.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform