Publishing charts - specify image name

G

Guest

We are using Excel to manipulate some real time data then publish the updated
results every 15 minutes to the Internet. I am publishing charts using
Excel's Save as Web Page feature, but then only want to use the images of the
charts as an included image in the actual web pages.
The images end up with names like "xyz_89654_image001.gif". The
"image001.gif" part I don't have a problem with - as long as there is only
one image in each subdirectory, that will be it, and the xyz comes from the
workbook name. It's the number in the middle that I have real problems with.
At the moment I only have a couple of lots of beta data to deal with (with 6
charts each) so I have hard coded the image name into the web pages and that
works fine. But I could end up with 100s of these and think specifying a
generic name for the image would be easier to automate.
Can this be done? I'm new at doing web pages so I may be approaching this
all the wrong way.
 
A

Andy Pope

Hi,

Maybe you could make use of the charts .Export method via VBA.

From Excel help:

Worksheets("Sheet1").ChartObjects(1) _
.Chart.Export _
FileName:="current_sales.gif", FilterName:="GIF"

Cheers
Andy
 
G

Guest

Thanks, Andy. You set me looking elsewhere and found what I needed was to
specify the DivID in the PublishObject method rather than letting Excel
default it to whatever.
 

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