Export Chart to jpeg

  • Thread starter Thread starter max_dub
  • Start date Start date
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.
 
ok, i copied the chart to Visio and saved it was jpeg :))

mebbe excel shud have that functionality .. anyhow.. problem solved
 
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
 
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
 
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
 
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
 
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
 
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>
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top