Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to copy an Excel Chart and save it as JPG/GIf
Message
 
To
02/06/2003 13:34:05
Peter Wagner
Point Informática Ltda.
Limeira, Brazil
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00795319
Message ID:
00795335
Views:
16
Hi Peter,

When you select and copy an area of Excel spreadsheet -- any area, not only chart -- data in graphics format usually appear in the Clipboard.

It may be a handle to either Enhanced Metafile or Bitmap file.

Quite a simple test can prove it:
- open Excel spreadsheet with a chart
- select chart cell and copy it to the Clipboard
- open Paint or any other graphics application
- paste data from the clipboard

Check FoxPro sample code, which enumerates data formats currently available on the clipboard:
http://www.news2news.com/vfp/?example=32

* * *
Having a valid handle to graphics file (Enhanced Metafile or Bitmap) you are able to save graphics data attached to this handle in a file.

FoxPro example:
Storing clipboard content in a bitmap file
http://www.news2news.com/vfp/?example=189

* * *
Using Excel Automation you can find/select/copy all available charts on a spreadsheet.
Previous
Reply
Map
View

Click here to load this message in the networking platform