Results 1 to 4 of 4

Thread: Excel-file on a web-page using php?

  1. #1
    Join Date
    Nov 2008
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Excel-file on a web-page using php?

    Hi,
    for the site of my baseball-team, i have to find a way to add an Excel file to a page. Is there a php-script out there that can read excel-files or convert a complete file?
    Preferably the layout of the excel-file (bold, italic, colors, column-width, etc...) shout stay intact.

    If there is no such script there, is there one that lets you create an excel-like page using forms and php?
    I'm not very good at php (i can tweak existing scripts a bit) and the persons that have to use the "program" and make the excel-files don't know anything about scripting or web-design at all.

    Or should i just let them save the files as a pdf-file and let them upload that?
    Last edited by Gert; 03-12-2009 at 10:58 PM.

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    I'm not condoning this, but you could use Excel's "Save as Web Page" feature.

    Personally, I'd develop a PDF+MySQL application where the end user could directly input the stats into the web database. But, if that's not an option, I'd go the PDF route.

  3. The Following User Says Thank You to Medyman For This Useful Post:

    Gert (03-10-2009)

  4. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    OpenOffice, which you can get for free and will ready any excel-created file, can also export for web, and the code is decent looking to me. You'd have to test to be sure it works out, but, actually, building a table isn't all that difficult in terms of automated html-- something like a word document poses many more problems because of overall layout, but for a spreadsheet, it's just one big table (and that is, for "tabular" data, the best way to put it into a webpage anyway).
    So if you use that, you can just upload the page right to the site, but a better idea would be to cut the table out from the document and put that into your own page so you can style it and do whatever you want.
    You could even use php to extract the table, though you'd need to probably have a custom script for that. It's not terribly difficult, though, if you just want to give them a form to upload an exported-html file from openoffice and have php grab the table from it, though I'm not sure what you'd do with it after that (probably automatically generate a new page in your choice of styles).


    In general, automatically generated html is going to have problems, but hopefully not too many when you're using a limited type of data (just tables) and you are probably better off not dealing with another program or hand coding it when you've already got it in a semi-reasonable format already. (A sportscar is much nicer than a pony, but if you're nearing the finish line with a pony, probably no real point in stopping to go look for a sportscar...)
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. The Following User Says Thank You to djr33 For This Useful Post:

    Gert (03-10-2009)

  6. #4
    Join Date
    Nov 2008
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    I talked it over with the people who actually have to put the excel file on the site and they decided to go with an PDF-file and upload-script.

    djr33, i'm going to give the openoffice way a try with some other projects

Bookmarks

Posting Permissions

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