MS Excel as a database

Can PHP read a MS Excel sheet and the print it out in HTML and have it formatted just like the Excel sheet with cells?

I will receive an Excel doc with a schedule on it every so often and would like to have it displayed on a web page. I would rather not have it embedded since not everybody has Excel.

Any ideas?

You can access it using COM objects (not really sure how to do it though)

I suppose you could use css and other html features to make a grid look the way you want it to as well, However excel does have a feature to save itself as a web page. Perhaps that would be easier. Certainly save you a lot of work trying to get things right. Also the “Save as web page” feature of excel doesn’t embed it (as I understand it) thus the user will not need to have excel to view a web page generated from excel.

Thank you, I do believe the save as web page will work for me.

There is a class out there called Spreadsheet_Excel_Reader (search google, I think it’s on SourceForge) that can read excel files from PHP. It works well for normal sized files, but will run for ever if the file is a couple of megs large.

Sponsor our Newsletter | Privacy Policy | Terms of Service