I have done some charts in Excel that I want to import into a web page. They are basic Excel pages that I wish to put on a web page just as they appear in Excel, gridlines and all. The web page builder does not allow me to import Excel pages. I have tried saving the Excel pages as .txt files, but when imported onto a webpage, I lose all my gridlines and spacing and the info is no longer lined up.
I have printed out the Excel chart, scanned it and converted the picture to a GIF file, but it becomes a rather large file and takes some time for a browser to load in. I also lose some of the crispness and definition doing this way.
How can I get a simple gridlined Excel chart onto a web page in a clean, small-file size format? Is it possible to make them transparent so it looks like regular text with the background showing through?
You could have saved yourself half the trouble by pressing one button ‘Print Screen’.
If you have any photo editing software, (trial period should do) you should be able to paste the screenshot from the clipboard, crop it, and save it as jpeg, with, if necesary, a very low quality to filesize ratio.
Excel has an automation object that can be exposed as an ActiveX object if you are using server-side web pages. You can use the automation model to programattically build a spreadsheet, generate a chart, and save it as a GIF. Then you can link to the GIF on your page. I’ve done this many times.
However, there’s a pretty good performance hit for this, so it might be better to cache the image and only render it once in a while. How often does the data change? If you can get away with only updating the graphic once and hour or once a day or once a week or whatever, then one trick is to read the date on the GIF that was created last time. If the date is new enough, just skip the excel code and link to the already existing GIF. If the date is older, then render the GIF again. This way, you’re not regenerating the same graphic every time someone hits your page, but you’re still guaranteed a reasonably up to date chart.
If you just want to manually spit out a GIF of your chart, just create the chart in Excel, then do a “Save as Web Page”, and Excel will render the chart as a GIF and create an HTML page with a link to it.
A “chart” is a graph, a pictorial display of values. Is that what you’re trying to put on a web page? Or do you mean a “worksheet”, i.e. a table with rows & columns of numbers?
You say you want to import charts, but your drescription implies you’re really talking about workheets.
For charts, a simple way is to highlight the chart in Excel, choose “Copy”, then open Paint and chosse “Paste”. That gives you a grapic of the chart that you can then save as a gif or jpg and then you incorporate that into your web page using your web page designer.
That’s fine for simple stuff that doesn’t change often.
You can also use the “save as web page” function in Excel to create a web page that looks a lot like the Excel sheet, both for charts and for worksheets. Excel can send that directly to yuorr website, or you can save it as html on yuor local disk & then use yuor web deisgner to upload it to your site.
If I were doing it, I would try saving directly as an html file.
If Excel won’t do that, try cutting and pasting the table in to Word and saving as html from there. This PC only has MSWorks on it, but the word processor supports saving as html. I expected it to try making a table out of it, but it seems to have saved the table as a .gif file.
It did a fairly good job of it though, so I’d try that first.
You say you’re using a web page builder. What program are you using?
The more sophisticated web authoring software like Dreamweaver has a function that allows you to import tabular data (e.g., comma or tab separated text files) directly, and it will automatically convert the data into an html table.
If you don’t have access to Dreamweaver, and if your data is not especially confidential or sensitive, you can email it to me and i’d be happy to import it to Dreamweaver and create an html file for you.
My email is in my profile, if you’re interested.
The only reason i would hesitate to follow Nanoda’s suggestion is that Microsoft Office products like Word have a tendency to produce extremely bloated code that often only works in MS browsers. Dreamweaver’s code is not perfect, but in my experience it’s far better than Microsoft’s.
I’d agree with LSL Guy’s method because it is precisely what I do.
Here is one of my web pages: http://www.1728.com/calcprim.htm
It has 3 graphs that were created with the Excel to MS Paint method.