Is there any other PHP components like PHPExcel?
Answers
Vendors cannot be loaded using App::uses()
in CakePHP, this is because CakePHP cannot expect external libraries to follow the same standards regarding folder and file naming. You can still use App::import('Vendor', ...)
as you did in version 1.3 of the framework.
Now, using App::import()
for vendors is kind of silly, if you think about it. It is just an expensive, verbose and very silly wrapper for require_once()
.
In 2.0, we actually encourage people to use require or require_once for their Vendor libraries. You can get the location of the Vendor folder using App::path('Vendor')
or just APP . 'Vendor' . DS
.
Definition of which is the best is very subjective... I have a vested interest when I say that PHPExcel is the best, because I'm the main developer. However:
- very few of the packages listed in this thread are still actively supported
- work only with one or other format of Excel files (BIFF .xls or Office Open XML .xlsx)
- can only read, or only write
- or require third-party plug-ins, or specific operating platforms
Best is a very subjective term, and it really depends on your exact requirements including
- whether you are able to use (for example) COM to interact directly with MS Excel on the server
- or need to both read and write Excel
- or need to work with xls, or xlsx or both formats
- or care about ongoing development/support
Do you mean like Kohana 2.x's flash session variables?
The latest Kohana supports get_once()
which is pretty similar to the old flash session variables.
$session = Session::instance();
$session->set('test', 'Hello, World!');
// The session variable is returned and removed.
$test = $session->get_once('test');
After asking some CakePHP developers I came out with the conclusion that it is not possible to use an Oracle Database with CakePHP 2.3 if you want to make a proper use of CakePHP Models and their query syntax. There's no yet available any driver for Oracle in CakePHP which is completely functional.
Therefore, the solution I found was to use the OCI8 Functions of PHP.
Like this i could use oci_parse
to directly query against the DB or rather call a PL-SQL procedure which is what I finally decided to do. (because of the sql functions complexity and the division of task inside my work group)
Now, I can not make use of many of the advantages of using CakePHP models, but It was the only way.
There is some class that generates PHP Excel files (real excel files, not that .csv thing). I use (DEPRICATED) See edit 2:
https://github.com/PHPOffice/PHPExcel
BUT: I have had a problem when trying to read these generated excel files with the java excel READER, so there might be bugs in this PHP script.
EDIT: Nice one: http://www.phpclasses.org/package/2037-PHP-Generate-spreadsheet-files-Excel-xls-XML-format.html