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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using VB to display excel charts on Web

Status
Not open for further replies.

ewooster

MIS
Joined
Nov 16, 2000
Messages
3
Hello everyone!

I'm begining a project to take existing data from access database and display in a chart form on the Web. Currently my thinking is to use VB to take the data from Access put it into an excel file that would then save the chart as a .gif file. The webpage would then display the graph (or .gif file) for our users. The user would be able to select wich info he/she would like to graph by selecting from various command buttons on the web page. I was wondering if anyone had any prior experience with something of this nature who could provide some insight as to how difficult this is or steps I should take to make this happen.
 
Hi

I suppose the suggestion you provided can work if you decide to go that route.

I'm also busy with an (IIS) application that is required to chart data. I'm looking at using a programming language independant solution....maybe xml & xsl.

If you have Office 2000 then I can possibly provide you with a solution. You don't need the entire Office 2000 package just the Web components.

Run the setup and you only need to install the Microsoft Office Web Components

Once the components are installed on your server, then you can use Server.CreateObject to create instances of the component as required
Whats more is that the chart component is a dll so it's ready for use within MTS.

the component has a ExportPicture function that is used to (as you've guessed) export the chart as a gif file.
You can then link to that file <img src = ......

Before you get excited read further ;)

The problem (if you cannot see it by now) is that you'll be sitting with all these .gifs (everytime a user requests a chart a gif is created). That sux... so to take the solution further you could have scheduler-type function run everytime a user requests a chart.

The scheduler can look something like this

.....
Loop through the dir where files created
Check the date created (this is important as you don't want to delete a file that's in-use by the os)
This can happen when your program is busy writing out the .gif file using the ExportPicture function
You can then delete all files that are older than than say 1 minute (you can obviously set this to any value)
.....

No code is provided with this reply but if you wish I can post the code to a beta version I'm sort-of working on.

Reply to this thread if you're interested in seeing the source

I must add that I'm not pursuing this solution at this point in time as I am seeking an alternative that involves using colspan & rowspan attributes of <td> tags in HTML

Hope this helps
caf
 
Caf-

Thanks for the help. Sorry for my delay in posting. Was away from the job enjoying the Thanksgiving Holiday. I would be interested in viewing the source for your beta version. I do have the Office 2000 installed and am interested in your idea for my problem. I've played around briefly at the export picture function and the save as web functions for the excel charts. I think there are some possibilities there. However like you said, I don't want to have numerous gif files out in existence. Also, I would like to have the chart image be refreshed as the data it pulls from is updated. The chart will be charting order numbers and sales volume for a particular project I am working on. As the orders come in, I would like the chart to update to reflect that change. Instantaneous would be nice, but I can accept a delay in posting if necessary. If you have any other ideas, or source code that might apply to my situation that would be great!!

Thanks so much for your help to date!
 
almost done with the beta
Will post it soon
:-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top