Avatar of jlcannon
 asked on

Display graphic to website based on excel worksheet data

Hello all,
I am needing some code on how to display a certain image based on what data is filled in on a worksheet. What I want is I have basically a red dot, yellow dot and green dot small graphic that I want to use and on the website will be a table with a name in one cell and in the cell right next it I want to depending on the spreadsheet populate it with one of those images. Lets say Steve has 4 papers due and 1 turned in on his sheet will be a column for due papers and a column for turned in papers and then a pecent complete. well I want to use the number in percent complete to determin what color gife to use on the website. If less that 40 I use red between 41 and 60 yellow and 61-100 green. Does this make sense? I would love to have this done automatically as right now I manually change the colors based on going to look at the spreadsheet and then editing the webpage.
ASPMicrosoft ExcelWeb Development

Avatar of undefined
Last Comment

8/22/2022 - Mon

Can you post a picture of the current graphic?

I have code I used for something similar that makes a horizontal bar chart (could be vertical) that shows x/y completed with percentages.
If the percentage is below or between certain thresholds the color of the bar changes.
My example is ASP gettiong data from Access, but it sounds like you've already figured out how to talk to Excel.

Currently it is all manual. When the spreadsheet is updated I take those numbers and then I open the html page and just change the number and manually change the picture reference so I was hoping to maybe use asp vb code to automate the process. I do know how to read data from excel and I just thought maybe there was an IF statement I could use to say "If cell b6 is <41 then this graphic if b6 >40 and <60 then this graphic if b6 >60 then this graphic.
Your help has saved me hundreds of hours of internet surfing.

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question