PHP/HTML - Export to Excel
Moderator: General Moderators
-
koolsamule
- Forum Contributor
- Posts: 130
- Joined: Fri Sep 25, 2009 10:03 am
PHP/HTML - Export to Excel
Hi Chaps,
I have a HTML table, and need to export the contents, with formatting to MS Excel.
Does anyone know of a simple way to do this?
I have a HTML table, and need to export the contents, with formatting to MS Excel.
Does anyone know of a simple way to do this?
-
koolsamule
- Forum Contributor
- Posts: 130
- Joined: Fri Sep 25, 2009 10:03 am
Re: PHP/HTML - Export to Excel
I've tried that dude, came across PHPExcel classes, but haven't got a clue how to incorporate them into my existing web app. . . .that's why I'm asking for help. . . .
Re: PHP/HTML - Export to Excel
Well taking existing code and implement it is a simple way of doing it. An even simpler way would be to pay someone to do it for you.
-
koolsamule
- Forum Contributor
- Posts: 130
- Joined: Fri Sep 25, 2009 10:03 am
Re: PHP/HTML - Export to Excel
uhh....not really what i'm after, would like to know how to do it myself, rather than pay someone to do it.
-
socalocmatt
- Forum Newbie
- Posts: 15
- Joined: Tue Nov 03, 2009 12:45 pm
Re: PHP/HTML - Export to Excel
I have also been interested in working with this class. I haven't come across a project where I need to use it... yet. I do have their documentation on it:
http://phpexcel.codeplex.com/Release/Pr ... adId=90450
but I have yet to pour over it all and test any type of implementation.
I'm pretty sure that if the solution for every problem was "pay someone else to do it", this forum, and others, would be pretty dead. People are here to learn from one another and not have the answer be "pay someone to do it". Just MO.
http://phpexcel.codeplex.com/Release/Pr ... adId=90450
but I have yet to pour over it all and test any type of implementation.
I'm pretty sure that if the solution for every problem was "pay someone else to do it", this forum, and others, would be pretty dead. People are here to learn from one another and not have the answer be "pay someone to do it". Just MO.
-
Mark Baker
- Forum Regular
- Posts: 710
- Joined: Thu Oct 30, 2008 6:24 pm
Re: PHP/HTML - Export to Excel
If you're building the HTML from XML/database/array data, then you can just as readily update PHPExcel cells with that information, and then set cell stylings before writing it to xls.
Simply include the library, and instantiate a PHPExcel object. Then you can loop through your data, writing to each row of a worksheet.
There's plenty of examples showing how to populate and format cells in the PHPExcel Tests directory
Simply include the library, and instantiate a PHPExcel object. Then you can loop through your data, writing to each row of a worksheet.
There's plenty of examples showing how to populate and format cells in the PHPExcel Tests directory
Re: PHP/HTML - Export to Excel
How about outputting the header info as an cvx or xls file.
Here:
http://www.modwest.com/help/kb6-135.html
Here:
http://www.modwest.com/help/kb6-135.html
-
Mark Baker
- Forum Regular
- Posts: 710
- Joined: Thu Oct 30, 2008 6:24 pm
Re: PHP/HTML - Export to Excel
Simply setting the headers to pretend that it's an xls file doesn't make it one.jaywebguy wrote:How about outputting the header info as an cvx or xls file.
And the OP wants the formatting as well as the data - so it needs to be the real thing