I have a cell in an excel sheet that i am trying to read. When I use the function getCalculatedValue it's throwing following error:
Financials!LU83 -> Financials!LU81 -> Formula Error: An unexpected error occured
I wrote following function to read from a cell
private function getCellValue($data)
{
//example of data variable
//$data = [0, 'G79'];
$excel = $this->excel;
$excel->setActiveSheetIndex($data[0]);
\PHPExcel_Calculation::getInstance($excel)->flushInstance();
\PHPExcel_Calculation::getInstance($excel)->clearCalculationCache();
return $excel->getActiveSheet()->getCell($data[1])->getCalculatedValue();
}
that cell that I am trying to read has following value
=LU83+LT84
where LU83 has following value
=LU73-SUM(LU76:LU81)
LU81 has value
=VLOOKUP(LU8,'Wiser Return'!$O:$S,5,0)
I have no idea why I am getting this error. I wish there was a way to debug? Is there a way?
Any help is appreciated.
Thanks