CakePHP 2.x Helper and Component for creating / reading excel files using PHPExcel project
Latest commit 82c4e9b Oct 8, 2014 @segy Update PhpExcelHelper.php
vendor load bugfix

PhpExcel helper and component for CakePHP 2.x

PHPExcel is a great library that can create XLS files. For more information see PHPExcel project homepage.

I added method for setting font and for easy table data adding. Short example:

// create new empty worksheet and set default font
    ->setDefaultFont('Calibri', 12);

// define table cells
$table = array(
    array('label' => __('User'), 'filter' => true),
    array('label' => __('Type'), 'filter' => true),
    array('label' => __('Date')),
    array('label' => __('Description'), 'width' => 50, 'wrap' => true),
    array('label' => __('Modified'))

// add heading with different font and bold text
$this->PhpExcel->addTableHeader($table, array('name' => 'Cambria', 'bold' => true));

// add data
foreach ($data as $d) {

// close table and output