Export Chart to jpeg

M

max_dub

I am using MS Excel 2007, and want to export the chart to jpeg file,
but i am not able to locate the functionality, Can anyone give some
clues for it :))

cheers
Mo.
 
M

max_dub

ok, i copied the chart to Visio and saved it was jpeg :))

mebbe excel shud have that functionality .. anyhow.. problem solved
 
C

CLR

You're right, it is a function that I also think should be included in
Excel.
For now, I copy and paste into PaintShopPro, and then save as .jpg

Vaya con Dios,
Chuck, CABGx3
 
B

Bob I

may also paste into Ms Paint or Microsoft Office Picture Manager and
make .jpg files.
 
D

Don Guillett

This will do what you want to a folder c:\a or create it if it doesn't exist

Private Sub ExportChartJPG()
On Error Resume Next
MkDir "c:\A"
Worksheets("Chart").ChartObjects(1).Chart.Export Filename:= _
"C:\A\MyChart.jpg", FilterName:="jpeg"
End Sub
 
G

Gord Dibben

Chuck

I think I got this from John W. or Chip but disremember.

Sub SaveAsjpg()
' Saves the active chart as a jpg file
' Prompts for a file name and directory
Dim FileName As Variant
If ActiveChart Is Nothing Then
MsgBox "Select a chart to export."
Else
FileName = Application.GetSaveAsFilename( _
InitialFileName:=ActiveChart.Name & ".jpg", _
FileFilter:="jpg Files (*.jpg), *.jpg", _
Title:="Save chart as jpg file")
If FileName <> False Then ActiveChart.Export FileName, "jpg"
End If
End Sub


Gord Dibben MS Excel MVP
 
C

CLR

Thanks Gord...........although I only occasionally have need to turn a chart
into a .jpg, I am really more interested in exporting drawing objects, and
or range selections, etc as .jpg's.........I'll play with that code some
tomorrow to see if I can get it will serve that purpose as well...

thanks again,
Vaya con Dios,
Chuck, CABGx3


Gord Dibben said:
Chuck

I think I got this from John W. or Chip but disremember.

Sub SaveAsjpg()
' Saves the active chart as a jpg file
' Prompts for a file name and directory
Dim FileName As Variant
If ActiveChart Is Nothing Then
MsgBox "Select a chart to export."
Else
FileName = Application.GetSaveAsFilename( _
InitialFileName:=ActiveChart.Name & ".jpg", _
FileFilter:="jpg Files (*.jpg), *.jpg", _
Title:="Save chart as jpg file")
If FileName <> False Then ActiveChart.Export FileName, "jpg"
End If
End Sub


Gord Dibben MS Excel MVP
 
D

Debra Dalgleish

Andy Pope has a graphic exporter that might help you:

http://www.andypope.info/vba/gex.htm
Thanks Gord...........although I only occasionally have need to turn a chart
into a .jpg, I am really more interested in exporting drawing objects, and
or range selections, etc as .jpg's.........I'll play with that code some
tomorrow to see if I can get it will serve that purpose as well...

thanks again,
Vaya con Dios,
Chuck, CABGx3
 
M

Michael Bednarek

I am using MS Excel 2007, and want to export the chart to jpeg file,
but i am not able to locate the functionality, Can anyone give some
clues for it :))

PDFCreator is mostly used to produce PDF files (by printing to its
pseudo printer - there are many such programs available). However,
PDFCreator's "little extra" is that it can also print to Postscript
(PS), Encapsulated Postscript (EPS), PNG, JPEG, BMP, PCX, and TIFF.

In other words, you can convert anything you can print to those formats.

See: <http://sourceforge.net/projects/pdfcreator>
<http://www.pdfforge.org/products/pdfcreator>
 
D

Dave Peterson

Does it have to be a .jpg file?

If a .gif is ok, then this may work for you:

Save the file as a .htm file (say book1.htm)

You'll see a book1_files subfolder in that folder that contains lots of
files--and you'll see a .gif for each of your charts.
 
Top