Click to See Complete Forum and Search --> : Recommend an Excel Class


RossC0
03-16-2005, 07:55 AM
Hi,

I noticed there are a few php to excel classes about - can anyone recommend one?

I've heard about:
PEAR Spreadsheet_Excel_Writer package
BiffWriter

Any body recommend any of these or any others??

goldbug
03-16-2005, 08:16 AM
While it's not a self-contained class, I'll toss this in there:

You can easily spit out excel to a browser by sending the proper MIME type (application/excel or application/vnd.ms-excel), then writing a simple HTML table. Another simple alternative is an XML document, but that only works in Excel XP/2002 and newer (but is much nicer to work with IMHO).

piersk
03-16-2005, 08:45 AM
I know you can do send the MIME type as excel using ASP, but didn't know you could using PHP.

RossC0, have you thought about using COM?

I would say that the PEAR (http://pear.php.net/package/Spreadsheet_Excel_Write) class you suggest earlier would do the trick

RossC0
03-16-2005, 08:49 AM
Good stuff,

I'm using the headers approach at the moment - but I would like to include functions and more native excel stylisation - rather than allowing its interpretation on my stylesheet.

Anyone use the Pear library, the biffwriter require zend optimiser - which is currently not installed - so its a no no on my dev box.

piersk
03-16-2005, 08:52 AM
Just as a POI: Zend Optimizer is free...

It's not a bad thing to have PEAR installed. There are many useful classes within PEAR.

RossC0
03-16-2005, 08:56 AM
Does zend optimiser ever cause problems, with scripts? Is it free for commerical applications?

Looks like Pear is the winner! :)

piersk
03-16-2005, 09:12 AM
Originally posted by RossC0
Does zend optimiser ever cause problems, with scripts? Is it free for commerical applications?

There is a warning on the Zend Optimizer page, saying that you should upgrade. I've not heard of problems with it.

It is free for commercial use. The idea is that you install it once on the web server and it does everything for you