Excel-file on a web-page using php?
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 11:58 PM.
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.
The Following User Says Thank You to Medyman For This Useful Post:
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
The Following User Says Thank You to djr33 For This Useful Post:
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