Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.charting
|
|||
|
|||
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
Posted to microsoft.public.excel.charting
|
|||
|
|||
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
Posted to microsoft.public.excel.charting
|
|||
|
|||
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
Posted to microsoft.public.excel.charting
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Chart Images Will Not Show | Excel Discussion (Misc queries) | |||
export re-order input fields to export file [csv] | Excel Worksheet Functions | |||
eXcel 2000 export CSV with images | Excel Discussion (Misc queries) | |||
Export custom Macro Button Images | Setting up and Configuration of Excel | |||
Export custom Macro Button Images | Excel Discussion (Misc queries) |