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!
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.
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
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 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.
"If HTML and the Web made all the online documents look like one huge book, RDF, schema, and inference languages will make all the data in the world look like one huge database"
-Tim Berners-Lee, Weaving the Web, 1999
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.
"If HTML and the Web made all the online documents look like one huge book, RDF, schema, and inference languages will make all the data in the world look like one huge database"
-Tim Berners-Lee, Weaving the Web, 1999
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.
__________________
If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.