Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying an Excel chart as a gif/jpg

Status
Not open for further replies.

donishere

Programmer
May 7, 2002
101
Is there a way (in ASP or otherwise) that will allow me to dynamically create a gif or jpg of a chart that's in an Excel spreadsheet?

Thanks,
Don
 
Thanks for the responses. However, I am looking for a way to grab a chart from an already existing Excel spreadsheet on the fly OR to create a chart from a spreadsheet on the fly.

durug, your link is a good start but that is drawing values from an HTML form. Does anyone know how to make an instance of Excel read an spreadsheet in ASP?

thanks,
don
 
Does what your doing start with the user having Excel open? Or is the user running a browser? To grab the chart on an existing spreadsheet, you should use VBA. Since you already have the chart, Durug's link showed how you do the save.
 
forecasting,

No, the user does not have excel open.

Here's the scenario:
I have a spreadsheet on the web server that has a table about server uptime. There is already a chart (line graph) for that table in that same spreadsheet.

Is there a way in ASP where can I generate just that chart into a gif or jpg?

Hope that explanation helped. Please keep the helpful suggestions coming.

don
 
It seems to me that the trick is getting the data out of the spreadsheet. Making the chart is easy after that. Can you save the spreadsheet as .HTM? The reason I am asking is that Office Web Components can be used to get at the data. The following link contains a download with code samples for the OWC.


This link gives you the additional help when automating Office on the server side:


Interestingly, one of the links in this KB article is how to use ADO to extract data from a worksheet. Once you have it out you can build arrays. Then you can use the first link I sent to create a server side .gif

I'm tossing out a lot of possibilities, hopefully something will connect. Your idea of putting charts on an ASP page reminds me of something I was once told. "Sooner or later, every good idea degenerates into work."

Let me know if anything sounds promising.
 
Thanks for the links. I'll look through them and reply with what I've discovered.

In the meantime, is there a place online that has a list of all available Excel-associated ASP commands?

thanks,
don
 
Check the object browser in the Excel VBA. I believe that the ASP coding follows the same syntax as its VBA code, once you are in.

What version of Excel are you automating?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top