...

View Full Version : xls files in html



Stefan Sobering
10-31-2007, 12:27 AM
i work in a small store, and for their website they would like to display their inventory. is there any way to display xls (spreadsheet files) in html? at the end of the day they would export their inventory and overwrite the xls file on the webserver. all i need to know how to do is display xls files in html. any help is appreciated. thanks!

_Aerospace_Eng_
10-31-2007, 12:41 AM
You can't. You would need to use a server side language like php or asp to parse the xls file and then you could display the results using html but again you STILL need a server side language. HTML is not one of them. Perhaps they should hire a professional.

zro@rtv
10-31-2007, 05:42 AM
Agree with Aero. Perhaps enlisting the services of someone qualified may be of use.

For the record, since you mention xls, I assume your using the MS products (yuk) which should allow you to export the document to 'Web Page'. I'm sure what ever it generate is absolutely horrendous, but that is a possible optoin that I do NOT really endorse.

Another perhaps viable solution would be to export the sheet as XML, and write an XSLT (http://www.w3schools.com/xsl/) to make it pretty? I'm kinnda grabbing at straws here, but maybe.

Yr best bet is write a server side solution thats nice and clean.

Apostropartheid
10-31-2007, 08:13 PM
Linking directly to the file makes Excel directly display it in the web browser, so you could try <iframe>s.

CaptainB
10-31-2007, 08:31 PM
Iframes have lots of disadvantages - stay free of 'em.

Apostropartheid
10-31-2007, 08:37 PM
Indeed they do, but if he absolutely cannot do anything else...

zro@rtv
11-01-2007, 06:46 AM
Linking directly to the file makes Excel directly display it in the web browser, so you could try <iframe>s.

Relying on the possibility that the users have an appropriate version of excel installed and configured to work in that disgusting manor is highly inadvisable. If you are simply going to offer the XLS file for download I would suggest making sure it is forced to download, and also would recommend having it available in different formats as well.

and yes, frames suck.

Stefan Sobering
11-01-2007, 10:41 PM
I know php. what do i do?

Stefan Sobering
11-02-2007, 06:22 AM
Let me rephrase that, i know BASIC php.

_Aerospace_Eng_
11-02-2007, 08:06 AM
I'm guessing you haven't tried searching for "Reading XLS file with php"?

http://www.ustrem.org/en/articles/reading-xls-with-php-en/

CFMaBiSmAd
11-02-2007, 08:54 AM
Long term, you are going to want a general purpose server side scripting language solution (just in case you have not made that decision already.)

Publishing the file as a "web page" using Excel or providing the .xls file as a link, suffer from usability problems and are both difficult/impossible to format to match the look and feel of the web site they are in.

By using a server side scripting language, you can format and present the data any way that you want.

The next step of course would be to computerize the inventory (order, receiving, shipping, payment, invoice...) system using a database and skip the spreadsheet all together.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum