Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export an excel chart to a bitmap

Status
Not open for further replies.

werjocks

Programmer
Oct 27, 2003
24
US
Hi,
I am trying to export an excel chart to a program that only accepts bitmaps, but haven't had much luck. What I've tried so far is the following...

ActiveChart.Export Filename:="e:\MyChart.bmp", FilterName:="BMP"

but apparently BMP isn't an acceptable filter. GIF and JPEG work ok (I can't find a filter listing). Any suggestions how to do something like this?
 
According to Jon Peltier, Excel charting expert and Microsoft Excel MVP, the graphics formats supported by the chart Export method are "GIF", "JPG" and "TIFF".

I'm guessing this can be done, but only by employing a somewhat clunky workaround or perhaps using the Win32 API.

On the kludgey side of things, have a look at the CopyPicture method, which will allow you to copy your chart to the Windows clipboard; Example:
Code:
ActiveChart.CopyPicture Appearance:=xlScreen, Format:=xlBitmap
Not sure what to do with it after that.


Regards,
Mike
 
yeah I had been trying to figure out what to do with that also... maybe I should give it another look. btw through a little experimentation, the filters also support gfa and png file formats, although I couldn't get the tiff filter to work. an odd collection I guess.
 
ok I can't figure out a good way to get the picture off the clipboard and into a file. Any suggestions?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top