This repository was archived by the owner on Jan 2, 2019. It is now read-only.
Catchable fatal error: Argument 2 passed to PHPExcel_Calculation::extractCellRange() #246
Open
Description
Hello.
This is the code I put:
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
date_default_timezone_set('Europe/London');
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
date_default_timezone_set('Europe/London');
/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../Classes/');
/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';
$inputFileName = '../eoJOU6rf9Wntw7mQf0cq/Software_work.xlsx';
$objPHPExcel = PHPExcel_IOFactory::load($inputFileName);
$objPHPExcel->getActiveSheet()->setCellValue('A1', 'test');
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->setIncludeCharts(TRUE);
$outputFileName = '../eoJOU6rf9Wntw7mQf0cq/Software_work2.xlsx';
$objWriter->save($outputFileName);
When I run it, I get message:
Catchable fatal error: Argument 2 passed to PHPExcel_Calculation::extractCellRange() must be an instance of PHPExcel_Worksheet, instance of PHPExcel_CachedObjectStorage_Memory given, called in [......]/Classes/PHPExcel/Calculation/LookupRef.php on line 429 and defined in [......]/Classes/PHPExcel/Calculation.php on line 3687
Have anyone of you got an idea of what could be causing this?
It seams to be dependant on the excel file, it works properly with other excel files, but not with the one I need. I tried a lot of different thing on that files such as getting rid of all cell names etc, to no results...
All help will be greatly appreciated ;)
Thanks