I\'m trying to use PHPExcel with CodeIgniter.
My problem is when i want to use this method below, I got PHP Fatal Error : Cannot redeclare class IOFactory
No need to write
$this->load->library('PHPExcel');
Just start with
$this->load->library('PHPExcel/IOFactory');
Edited :::
In my project I have done by these way,
Step1:
in libraries\PHPExcel\Reader
Rename Excel5.php
to PHPExcel_Reader_Excel5.php
Step2:
$filePath = $dir.$uploadedfile;
$objReader = $this->load->library('PHPExcel/Reader/PHPExcel_Reader_Excel5', $filePath);
$objReader = new PHPExcel_Reader_Excel5();
$objPHPExcel = $objReader->load($filePath);
$rowIterator = $objPHPExcel->getActiveSheet()->getRowIterator();
$sheet = $objPHPExcel->getActiveSheet();
$maxRowIndex = $sheet->getHighestRow();
$highestColumn = $sheet->getHighestColumn();
$maxColIndex = PHPExcel_Cell::columnIndexFromString($highestColumn);