Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    New Coder
    Join Date
    Jan 2006
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    xls files in html

    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!

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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!||||

  • #3
    Regular Coder zro@rtv's Avatar
    Join Date
    Feb 2005
    Location
    on the network
    Posts
    433
    Thanks
    0
    Thanked 1 Time in 1 Post
    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.
    ._-zro
    zro@redtv
    zro.redtv.org

    "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

  • #4
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Linking directly to the file makes Excel directly display it in the web browser, so you could try <iframe>s.

  • #5
    Regular Coder
    Join Date
    Jun 2007
    Posts
    805
    Thanks
    123
    Thanked 23 Times in 23 Posts
    Iframes have lots of disadvantages - stay free of 'em.

  • #6
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Indeed they do, but if he absolutely cannot do anything else...

  • #7
    Regular Coder zro@rtv's Avatar
    Join Date
    Feb 2005
    Location
    on the network
    Posts
    433
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by CyanLight View Post
    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.
    ._-zro
    zro@redtv
    zro.redtv.org

    "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

  • #8
    New Coder
    Join Date
    Jan 2006
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I know php. what do i do?

  • #9
    New Coder
    Join Date
    Jan 2006
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Let me rephrase that, i know BASIC php.

  • #10
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    I'm guessing you haven't tried searching for "Reading XLS file with php"?

    http://www.ustrem.org/en/articles/re...s-with-php-en/
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #11
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,079
    Thanks
    2
    Thanked 320 Times in 312 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •