I am on a project and I am reading values from an excel document. When using the getCalculatedValue function it does always return the same value. I tried the getOldCalculatedValue function without success. I read somewhere that it will be helpful if you clear the cache before recalculating the value from that cell. Can someone explain how can I do that with the below code?
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objPHPExcel = $objReader->load("test.xlsx");
$value1 = $objPHPExcel->getActiveSheet()->getCell('B1')->getCalculatedValue();
$value2 = $objPHPExcel->getActiveSheet()->getCell('D1')->getCalculatedValue();