ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   How can I export a chart as a jpg/tif? (https://www.excelbanter.com/charts-charting-excel/164934-how-can-i-export-chart-jpg-tif.html)

Tony B

How can I export a chart as a jpg/tif?
 
Hi there,

I regularly produce charts/graphs in Excel (2007), but need to export them
as a tiff or jpeg so that I can submit them to a scientific journal for
publishing (most publishers prefer images in this format).

Copying and pasting does not work, or if it does, the resolution is poor or
data is missing.

A previous posting on here had a response that mentioned an 'export' option,
but I cannot locate this.

I'd be really grateful for any advice.

Thanks in advance,

Tony.

Jon Peltier

How can I export a chart as a jpg/tif?
 
In VBA the Chart object has an Export method, which can convert a chart to a
variety of raster formats. I would suggest not using JPG; depending on your
computer's settings you should also be able to export GIF, PNG, or TIF. Note
that the resolution of the image will match the screen resolution.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Tony B" <Tony wrote in message
...
Hi there,

I regularly produce charts/graphs in Excel (2007), but need to export them
as a tiff or jpeg so that I can submit them to a scientific journal for
publishing (most publishers prefer images in this format).

Copying and pasting does not work, or if it does, the resolution is poor
or
data is missing.

A previous posting on here had a response that mentioned an 'export'
option,
but I cannot locate this.

I'd be really grateful for any advice.

Thanks in advance,

Tony.




Tony B[_2_]

How can I export a chart as a jpg/tif?
 
Thanks John,
Unfortunately I cannot find the option in VBA to export the charts as a
gif/tif/png (though I admit I've never used VBA!).
I clicked on the developer tab, opened VBA, then right-clicked on one of the
charts in the left-hand pane, which opened a dialog box with the export
option. However, the only format I seem able to export as is the .cls
extension.
As you say, it may depend on my computer's setting, or maybe I need to know
more about VBA to do it.
Thanks anyway- I appreciate your time in replying.
Best wishes, Tony.

"Jon Peltier" wrote:

In VBA the Chart object has an Export method, which can convert a chart to a
variety of raster formats. I would suggest not using JPG; depending on your
computer's settings you should also be able to export GIF, PNG, or TIF. Note
that the resolution of the image will match the screen resolution.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Tony B" <Tony wrote in message
...
Hi there,

I regularly produce charts/graphs in Excel (2007), but need to export them
as a tiff or jpeg so that I can submit them to a scientific journal for
publishing (most publishers prefer images in this format).

Copying and pasting does not work, or if it does, the resolution is poor
or
data is missing.

A previous posting on here had a response that mentioned an 'export'
option,
but I cannot locate this.

I'd be really grateful for any advice.

Thanks in advance,

Tony.





Jon Peltier

How can I export a chart as a jpg/tif?
 
Tony -

You have to write code that uses the Chart.Export method.

You could also download John Walkenbach's Chart Tools utility
(http://j-walk.com), which includes an export feature.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Tony B" wrote in message
...
Thanks John,
Unfortunately I cannot find the option in VBA to export the charts as a
gif/tif/png (though I admit I've never used VBA!).
I clicked on the developer tab, opened VBA, then right-clicked on one of
the
charts in the left-hand pane, which opened a dialog box with the export
option. However, the only format I seem able to export as is the .cls
extension.
As you say, it may depend on my computer's setting, or maybe I need to
know
more about VBA to do it.
Thanks anyway- I appreciate your time in replying.
Best wishes, Tony.

"Jon Peltier" wrote:

In VBA the Chart object has an Export method, which can convert a chart
to a
variety of raster formats. I would suggest not using JPG; depending on
your
computer's settings you should also be able to export GIF, PNG, or TIF.
Note
that the resolution of the image will match the screen resolution.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Tony B" <Tony wrote in message
...
Hi there,

I regularly produce charts/graphs in Excel (2007), but need to export
them
as a tiff or jpeg so that I can submit them to a scientific journal for
publishing (most publishers prefer images in this format).

Copying and pasting does not work, or if it does, the resolution is
poor
or
data is missing.

A previous posting on here had a response that mentioned an 'export'
option,
but I cannot locate this.

I'd be really grateful for any advice.

Thanks in advance,

Tony.







Andy Pope

How can I export a chart as a jpg/tif?
 
Hi,

As Jon says you need VBA code to use the export method of a chart.

Here is the simplest set of steps to do that.

Select your chart object or sheet
ALT+F11 (takes you to VBE)
CTRL+G (open immediate window)
Enter the following syntax, changing path, filename and filter type as
required.

activechart.Export "C:\temp\mychart.tif","tif"

Press Return to execute command.

Here is an addin that provides export functionality
http://www.andypope.info/vba/gex.htm

Cheers
Andy


Tony B wrote:
Thanks John,
Unfortunately I cannot find the option in VBA to export the charts as a
gif/tif/png (though I admit I've never used VBA!).
I clicked on the developer tab, opened VBA, then right-clicked on one of the
charts in the left-hand pane, which opened a dialog box with the export
option. However, the only format I seem able to export as is the .cls
extension.
As you say, it may depend on my computer's setting, or maybe I need to know
more about VBA to do it.
Thanks anyway- I appreciate your time in replying.
Best wishes, Tony.

"Jon Peltier" wrote:


In VBA the Chart object has an Export method, which can convert a chart to a
variety of raster formats. I would suggest not using JPG; depending on your
computer's settings you should also be able to export GIF, PNG, or TIF. Note
that the resolution of the image will match the screen resolution.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Tony B" <Tony wrote in message
...

Hi there,

I regularly produce charts/graphs in Excel (2007), but need to export them
as a tiff or jpeg so that I can submit them to a scientific journal for
publishing (most publishers prefer images in this format).

Copying and pasting does not work, or if it does, the resolution is poor
or
data is missing.

A previous posting on here had a response that mentioned an 'export'
option,
but I cannot locate this.

I'd be really grateful for any advice.

Thanks in advance,

Tony.





Tony B[_2_]

Thank you!
 
Thank you both very much for your help with this- I can now export!
All the best, Tony


All times are GMT +1. The time now is 03:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com