Problem exporting Chart as a jpg

T

theLuggage

Hi,

I have a chart I've created in Excel 2007 which includes a pie chart and
some tabular data that has been formated the way we want it on a regular
worksheet, then we copy it as a picture and paste that picture onto the
chartsheet next to the pie chart.

When I export the chart as a jpg, using this code:
ActiveChart.Export "C:\test.jpg", "JPG" true

The text in the tabular picture is getting screwed up. All the text gets
bolded and the text is bitmapped and jagged. It doesn't look like that in
the ChartSheet.

Any ideas?

I can send the Workbook so you can see what the Char t looks like, but I
don't see a way to attach it here.

Thanks in advance for your help.
 
J

Jon Peltier

JPG is a poor choice for an image comprised of discrete objects such as
a chart. The JPG format was designed to compress images like photographs
which have continuously varying shades and hues. PNG (or GIF) is a
better choice for line art like charts and screen shots.

In general PNG does a good job of reproducing what is shown on screen.

However, Excel 2007 does not give as nice results as its predecessors.

- Jon
 
T

theLuggage

You're correct, however, we tried exporting our charts in each of the formats
supported by Excel 2007 (png, gif, and jpg) and jpg showed the best results
in all but this one instance.

We even tried wmf, which you can achieve by copying and pasting the chart
from Excel into Word. When you open the .docx file in WinZip, you'll see the
image has been converted to a .wmf file.

You're also correct that previous versions of Excel did a better job at
picture fidelity.

Perhaps I should give a more complete picture of what we're doing. We have
an in-house developed Excel Addin that we use to create a bunch of standard
charts. We then import those charts into a Word document using a Word
Template with VBA code. The VBA code fires up Excel and asks Excel to export
each chart as a jpg, then it imports the jpg into the Word document.

Before upgrading to Office 2007, we used to simply do a copy/paste operation
in our VBA code, but we found that the image quality was really poor. So we
switched to exporting the images. And as I said, we found that jpg looked
the best in all but this one chart type.
 
C

Colbert Zhou [MSFT]

Hello,

I used a very simple chart in my side for test, but the exported jpg file
looks quite good to me. So I think this may related to how complex the
chart is. Would you mind sending me the workbook you are using, and I would
like to observe it in my side so that I can clearly see the issue. :)

You can access me via (e-mail address removed)

Have a nice weekend Sir!


Best regards,
Ji Zhou
Microsoft Online Community Support
 

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

Top