Link to home
Start Free TrialLog in
Avatar of simen041200
simen041200

asked on

How to link a xls or xml file to a web page?

Hi!

I'm making a web page that needs daily updating of pictures (stock charts), and a table of numbers & text.

I would like to just update an xls or xml file, to make the site possible to maintain on a daily basis.
I use Frontpage now, and the only option I have tried is to insert an office component; the spread sheet. But this only works with Internet Explorer. I also want it to work with firefox.

Please: Any suggestions or alternative methods?

Also, is there any specific html programs that makes regular updating easier?

Avatar of ecc204
ecc204

Read the xml at the server and render it as pure html to the client.
Avatar of simen041200

ASKER

ecc204: Thanks for your reply!
I must clarify that i have very little knowledge of html-coding, allthough I have done some basic html, c, c++ and java before. Are you able to describe more directly how I do this? Can it be done by a function, or must i hard code it?
You can, but do not need to, use Microsoft's XML family of API's.  Those would require hard-coding and knowledge of COM, too.

You would need to do some scripting.  I think the following article is right on point.

Create Dynamic HTML Forms with ADO, XML and XSL
at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnasdj01/html/asp0152.asp

Great ASP.NET Reports May be Easier Than You Thought!
at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnhcvs03/html/vs03g9.asp

If these are not enough, you can look at Chapter 13 of ASP.net Unleashed, starting at p. 656.

I guess we know how you are spending this weekend.  Good luck.
Hehe ... I liked the title  " ASP.NET .. Easier Than You Thought"   I don't even want to know the name :)

Is hard coding really the only way to display an excel file on web? Can it not be done by a simple link or insert feature? I thought maybe some other progams than Frontpage could have such a feature, but that Frontpage doesn't due to favorising of I.E..

What about saving the file as csv, can that be inserted without hard-coding?

God, I live in Norway, summer is not that long... :)
SOLUTION
Avatar of ecc204
ecc204

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ok then... I just wanted to know the easiest way. If that is ASP, then so be it. The server I use doesn't even support ASP I just found out. But thats ok.. I will do what I have to do.

But I don't believe that I have to hard code ASP if I don't want to. I'm just doing the most basic thing, to display a part of a spreadsheet. There gotta be visual design programs for this...?  And maybe also a free one?

Any suggestions for a free web-host offering ASP support?
And thanks for your suggestions ecc204, and for the encouraging part! :) Not that I'm lazy, I just have made kind of a principle not to do programming any more. Cause it usually gets very time consuming, cause I want to know more and more functions the longer I proceed. Oh, maybe I will cave in.. We will see..    

I will take a break, be back later.

Any further comments are welcome, please!
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

You can better use the CSV (Comma Seperated Values) for storing the data/Table. you can directly write the data to a file
on your server and make your Webpage to read from the Text file...I think it will be easy for you to do....
Well, this may be the answer:

ASP101.com has a short article about XML to HTML.  Here is the article and address

Update: Common Functions for Working with XML and XSL Files
at http://www.asp101.com/samples/xmlxsl.asp
Devestated:  This was not a bad idea, I didn't think about it.. I've tried it now, and it seems like it's actually making some kind of xml script. So maybe this is ASP too. I will test it some more.

I really just need a very simple table of two rows in the top of my web-page. Even though my question was focused on linking, the clue is just to get a simple table display in an easy way. Where the main goal is quick and easy updating with as few mouseclicks as possible. And the ability to reflect my formatting changes of the spreadsheet directly without any further editing. Actually I'm considering the option to just use a macro to take a cropped screenshot of the spreadsheet rows, and FTP it to the server. That or some ASP solution.  I will see...  

But... for ASP: are there any free web hosters with ASP support.. ?

Also, does any1 have a tip on macro programs? good once or even free once if it exists... ?
Thanks ecc204! Those links you post gives me a good starting point. I will read up on it if I chose this solution.
Perhaps i think what would be easier is to use a macro that suits you from here "A macro to make an HTML page from an Excel worksheet":- http://www.meadinkent.co.uk/xladvhtml.htm
there are examples which will allow you to build an entire web page using a simple macro.

or if you insist on xml there is an excellent macro available here that will allow you to "Export an Excel Worksheet to XML (Excel Macro)":- http://www.freevbcode.com/ShowCode.Asp?ID=1694

happy to help

Whaaat?!

You don't need a new web host or a new development platform or even (really) any programming!

When you look at a modern HTML (XHTML) document in a browser, you're looking at XML. You need to simply transform your XML into XHTML.

Why on earth has no one mentioned XSLT?
sumo_the_cat:     That sounds interesting, but I don't know if my host accept it;

My current host does NOT support:  CGI-scripts, ASP, PHP, SSI, Java servlets or MySQL.  Kind of poor, but anyway, that's what I have atm. I don't mind changing web host, but it I want to go for a free host, since my site is so basic.

Just for your reference, here is a screenshot close to how I want it to look:
http://www.home.no/cbr929rr/example.jpg 
It's ok to save my spreadsheet as html.. But I have troubles displaying it in a tight area. Cause if I make it to some sort of html file, I have 2 files to display. Frames does not work I think, cause I want the table to scroll up... Inline frame creates a high scrollbar which is also not desirable.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Well, still it creates in the end a xhtml file, which i have to display, and that gives me the same issues as described in my last post. My problem is to get it into the same single html file.. So its rather a layout problem at this point. To have 2 html files brings alot of trouble... at least I find it hard to keep a nice layout with it.
If I just want to display a spreadsheet on a single page, then I can just save it as a web page, works fine. Don't need to do any XSL or similar for that...
What you're trying to do is create a dynamic web page which changes its contents based on an XML document. XSLT is the correct way to do this.

If it were just a matter of saving the speadsheet as a static html file, you wouldn't be asking this question, and there would be far fewer web developers in steady employent!
Well don't focus too much on my initial question. That was just my first thought and might not be the best solution. I dont really need a true dynamic page.

The clue is what I want to display. The page will be updated manually about every day, with editing of pictures and text by opening the page in Frontpage, and manual FTP upload. So I just want to automate what can be automated. But I'm not turning into a web developer to achieve this 2-row table. Then I will just do a copy paste in stead.

Actually, with second thought, I will change my page layout, so I will get rid of the problem. I will just let the table be displayed through a link as a html page.

So thanks for all guidance to my question. Sorry for not picking up the solutions. But at least now I know where the limitations are, and can continue my work in a productive way with the knowledge of what options I have available.

I will close the thread later, making dinner..  :)
No probs; good luck with it - and have a nice dinner! Sumo.
Hi again!

Sorry i've been away, I rushed on for vacation and forgot to close the post. Well, it got a bit confusing this thread, as I didn't really favor the method I initially asked about, so I'll split some points and hope its fair. Anyway, thanks to all who made posts, for helping and for making this such a great site!

Oh, btw: I ended up just using Excels web export feature.

Simen