Hi Friends,
-- I use PHPExcel library.
Controller :
public $helpers = array('PhpExcel');
View :
<?php
$this->PhpExcel->createWorksheet();
$this->PhpExcel->setDefaultFont('Calibri', 12);
$table = array(
array('label' => __('Company'), 'width' => 'auto', 'filter' => true),
array('label' => __('city'), 'width' => 'auto', 'filter' => true),
array('label' => __('phone'), 'width' => 'auto')
);
$this->PhpExcel->addTableHeader($table, array('name' => 'Cambria', 'bold' => true));
foreach ($contacts as $contact) {
$this->PhpExcel->addTableRow(array(
$contact['Contact']['company'],
$contact['Contact']['city'],
$contact['Contact']['phone']
));
}
$this->PhpExcel->addTableFooter();
$this->PhpExcel->output();
?>
Now i get
Vendor class PHPExcel not found!
Error: An Internal Error Has Occurred.
Stack Trace
- APP\View\Helper\PhpExcelHelper.php line 37 → PhpExcelHelper->loadEssentials()
- APP\View\Themed\Default\Mis\index.ctp line 35 → PhpExcelHelper->createWorksheet()
- CORE\Cake\View\View.php line 947 → include(string)
- CORE\Cake\View\View.php line 909 → View->_evaluate(string, array)
- CORE\Cake\View\View.php line 470 → View->_render(string)
- CORE\Cake\Controller\Controller.php line 947 → View->render(null, null)
- CORE\Cake\Routing\Dispatcher.php line 193 → Controller->render()
- CORE\Cake\Routing\Dispatcher.php line 161 → Dispatcher->_invoke(MisController, CakeRequest, CakeResponse)
- APP\webroot\index.php line 97 → Dispatcher->dispatch(CakeRequest, CakeResponse)
Now what i am doing? please help me.
thanks,
Rajkamal
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment