PHP and Excel documents
Posted: Wed Nov 19, 2008 6:45 am
Helloooo!
This be my first post on here so hi.
Problem: I need to create Excel documents from a HTML table.
I was hoping to get php to do this... But i haven't managed to find any useful information online about how I could do it in PHP.
I found some stuff about Apache POI in Java which looks like it might be a reasonable solution, but I don't know how I would go about calling Java from PHP and then telling PHP when the file is ready.
I noticed a few bits of info online say this kindof thing can be done quite easily with microsoft languages, but I have to use a PHP server so that doesn't help
If anybody has any ideas, information or tips on either writing excel files in PHP or interfacing PHP with Java in the way mentioned above then please let me know.
Also if you know of any alternative formats which are compatible with MS Excel (without using any plugins in excel), and are simple to generate please let me know. **Formatting must be retained and it needs to open by default as a regular excel spreadsheet, and preferably excel wont tell me that the data in the file is in the wrong format or anything (this seems to happen with HTML files).
**The formatting only consists of html rowspans and colspans but if they are lost the data goes all wonkey and loses all meaning.
Ok so....
Any input is much appreciated.
At this stage I expect I will end up settling for a very simple solution such as dumping the HTML table into a file - but that isn't quite what I want.
Thanks in advance
This be my first post on here so hi.
Problem: I need to create Excel documents from a HTML table.
I was hoping to get php to do this... But i haven't managed to find any useful information online about how I could do it in PHP.
I found some stuff about Apache POI in Java which looks like it might be a reasonable solution, but I don't know how I would go about calling Java from PHP and then telling PHP when the file is ready.
I noticed a few bits of info online say this kindof thing can be done quite easily with microsoft languages, but I have to use a PHP server so that doesn't help
If anybody has any ideas, information or tips on either writing excel files in PHP or interfacing PHP with Java in the way mentioned above then please let me know.
Also if you know of any alternative formats which are compatible with MS Excel (without using any plugins in excel), and are simple to generate please let me know. **Formatting must be retained and it needs to open by default as a regular excel spreadsheet, and preferably excel wont tell me that the data in the file is in the wrong format or anything (this seems to happen with HTML files).
**The formatting only consists of html rowspans and colspans but if they are lost the data goes all wonkey and loses all meaning.
Ok so....
Any input is much appreciated.
At this stage I expect I will end up settling for a very simple solution such as dumping the HTML table into a file - but that isn't quite what I want.
Thanks in advance