Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 109
Default Chart.Export images are shrinking as I export more images

Hi, I have a chart object in an excel sheet, that I have programmatically
exporting the chart to JPG file. I have a button the the page, that I have
tied to VB MOD in the worksheet that does this:

Dim chartObject As chartObject
Set chartObject = Sheet3.ChartObjects(2)
chartObject.Chart.Export GetFilePath(), "jpg", False
Set chartObject = Nothing

The export works fine and creates new images every time the user clicks on
the button, but the problem is user is exporting the chart many times the
chart image file starts to shrink in size? I am using Excel 2003. Has
anyone out there had this problem, and if so what did they do to correct the
issue?

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 6,582
Default Chart.Export images are shrinking as I export more images

1. In general, jpg is the wrong format to use for exporting charts. Use gif
or png instead.

2. I ran your code several times and the output files were all identical.
What else is happening to the chart in between export cycles?

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


"Jared" wrote in message
...
Hi, I have a chart object in an excel sheet, that I have programmatically
exporting the chart to JPG file. I have a button the the page, that I
have
tied to VB MOD in the worksheet that does this:

Dim chartObject As chartObject
Set chartObject = Sheet3.ChartObjects(2)
chartObject.Chart.Export GetFilePath(), "jpg", False
Set chartObject = Nothing

The export works fine and creates new images every time the user clicks on
the button, but the problem is user is exporting the chart many times the
chart image file starts to shrink in size? I am using Excel 2003. Has
anyone out there had this problem, and if so what did they do to correct
the
issue?

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 109
Default Chart.Export images are shrinking as I export more images

I will try your option 1., that sounds promising.

Option 2. Between clicks I am programmatically coping cells from column A to
column B. These values are NOT changing the trace on the chart. When the
chart gets smaller, the actual dimensions of the picture aren't smaller, but
if you look at the pictures side by side, you will notice the grid is getting
smaller on the screen.

I also have noticed that is isn't a problem in XCEL 2007 (Compatibility
Mode), only in 2003 and 2000? Any ideas?

Thanks in advance for all you help, I really appreciate it!

"Jon Peltier" wrote:

1. In general, jpg is the wrong format to use for exporting charts. Use gif
or png instead.

2. I ran your code several times and the output files were all identical.
What else is happening to the chart in between export cycles?

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


"Jared" wrote in message
...
Hi, I have a chart object in an excel sheet, that I have programmatically
exporting the chart to JPG file. I have a button the the page, that I
have
tied to VB MOD in the worksheet that does this:

Dim chartObject As chartObject
Set chartObject = Sheet3.ChartObjects(2)
chartObject.Chart.Export GetFilePath(), "jpg", False
Set chartObject = Nothing

The export works fine and creates new images every time the user clicks on
the button, but the problem is user is exporting the chart many times the
chart image file starts to shrink in size? I am using Excel 2003. Has
anyone out there had this problem, and if so what did they do to correct
the
issue?

Thanks




  #4   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 6,582
Default Chart.Export images are shrinking as I export more images


I will try your option 1., that sounds promising.


I don't think it will have any effect on the shrinking, but in general the
images will be sharper.

Option 2. Between clicks I am programmatically coping cells from column A
to
column B. These values are NOT changing the trace on the chart. When the
chart gets smaller, the actual dimensions of the picture aren't smaller,
but
if you look at the pictures side by side, you will notice the grid is
getting
smaller on the screen.


Are you copying cells with formatting, or just values?

By 'grid', do you mean the plot area rectangle defined by the axes?

If the values are increasing, then the axis labels might be growing by a
character at a time. This forces the axis into the chart to make room for
longer labels, and therefore, shrinks the plot area.

I also have noticed that is isn't a problem in XCEL 2007 (Compatibility
Mode), only in 2003 and 2000? Any ideas?


Hmm, I'd expect it to be a problem in 2007 and not in the others. But that's
because of other interesting functionality I've encountered in 2007. If it's
the changing size of axis labels, there may be differences in how Excel 2007
handles the text.

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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chart Images Will Not Show kathka Excel Discussion (Misc queries) 1 January 2nd 08 01:12 PM
export re-order input fields to export file [csv] madisonpete Excel Worksheet Functions 0 November 30th 07 03:51 PM
eXcel 2000 export CSV with images SunnyOz Excel Discussion (Misc queries) 5 January 13th 07 04:16 PM
Export custom Macro Button Images RWN Setting up and Configuration of Excel 1 November 26th 06 11:52 AM
Export custom Macro Button Images RWN Excel Discussion (Misc queries) 1 November 26th 06 10:53 AM


All times are GMT +1. The time now is 12:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"