Wednesday, October 9, 2013

Re: Writing data into a new worksheet using PHPExcel in Cakephp

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

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: