Fatal error when reading Excel file

Topics: User Forum
Jul 7, 2013 at 8:23 AM
Hi,

I have some code that reads 3 uploaded xls files that the user upload and using the data in it.
For some reason I get the following error:

Fatal error: Call to undefined method PHPExcel_Shared_Escher::addChild() in C:\xampp\htdocs\readexcel\Classes\PHPExcel\Reader\Excel5\Escher.php on line 473

I also get the same error on our Ubuntu server.
The PHPExcel is the latest version 1.7.9
PHP 5.3
I am try to load the file using this line:
$objPHPExcel = PHPExcel_IOFactory::load($_FILES['averages']['tmp_name']);

Thanks,
Bnaya
Jul 7, 2013 at 8:51 AM
If I load the file like the following:
        $inputFileType = PHPExcel_IOFactory::identify($_FILES['averages']['tmp_name']);  
        $objReader = PHPExcel_IOFactory::createReader($inputFileType);  
        $objReader->setReadDataOnly(true);  
        
        $objPHPExcel = $objReader->load($_FILES['averages']['tmp_name']);
I don't see any error but it looks like all the files are empty, which they aren't.
$inputFileType returns "Excel5'.

any advice will be appreciated.

thanks
Jul 9, 2013 at 1:57 PM
After saving these files in xlsx format they are ok. any advice?