When I load the library of excel I got this error. I follow everything in this Tutorial and still got some error
Im using codeigniter framework.
Class 'CI_Excel' not found in /var/www/html/warehouse/system/core/Common.php on line 196
this is my controller
class Dashboard extends CI_Controller {
public function __construct(){
parent::__construct();
$this->load->library('excel');
$this->load->model('dashboard_model');
}
public function download(){
$this->excel->setActiveSheetIndex(0);
$this->excel->getActiveSheet()->setTitle('Warehouse List');
//$this->load->database();
$results = $this->dashboard_model->get_all();
$this->excel->getActiveSheet()->fromArray($results);
$filename='Warehouse List.xls';
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="'.$filename.'"');
header('Cache-Control: max-age=0');
$objWriter = PHPExcel_IOFactory::createWriter($this->excel, 'Excel5');
$objWriter->save('php://output');
}
}
This is my Excel class in my Libraries
<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
require_once APPPATH."/third_party/Classes/PHPExcel.php";
class Excel extends PHPExcel {
public function __construct() {
parent::__construct();
}
}