I am trying to clone a worksheet and am getting a fatal error.
__Fatal error: clone method called on non-object in C:\wamp\www\sites\techwaterlabs\application\controllers\admin\reports.php on line 119
Here is my code:
$gwreader = new PHPExcel_Reader_Excel5();
$gwswPHPExcel = $gwreader->load(APPPATH."files/gwsw.xls");
$clone = clone $gwswPHPExcel->getSheetByName('0');
The file reader works just fine. When I var_dump $gwswPHPExcel it is perfect. The clone is the only thing breaking.
I also use the clone in this same function and works fine. No differences in the code.