dakota / CakeExcel

A plugin to generate Excel files with CakePHP. Uses the PHPExcel library.
MIT License
22 stars 25 forks source link

PHPExcelHelper #8

Closed joaorsb closed 8 years ago

joaorsb commented 8 years ago

Configured the pull request version of this(with changes for the 3.1 version of CakePHP, as the 3.0 doesnt work anymore due to changes in the viewClassMap at the RequestHandler configuration), but it doesn't work when I call the $this->PhpExcel on the view with the error "Helper class PhpExcelHelper could not be found".

Sample code taken from web, at index.ctp:

<?php $spreadsheet = $this->PhpExcel; $spreadsheet->setActiveSheetIndex(0); $worksheet = $spreadsheet->getActiveSheet(); $worksheet->SetCellValueByColumnAndRow(0, 1, 'Hello World');

$writer = new PHPExcel_Writer_Excel2007($spreadsheet); $writer->save('hello-world.xlsx');

?>

joaorsb commented 8 years ago

Fixed after PR merge :D