Similar to these documentations.
https://support.office.com/en-us/article/Replace-a-formula-with-its-result-32a9675c-45f0-4a15-b130-d55356437c86 (For Mac) And https://support.office.com/en-us/article/Replace-a-formula-with-its-result-38001951-c0e8-4fbd-9048-37ef81e2891e (For Windows)
Can we replace a Formula with the cell Value using PHPExcel.
For example: Given Cell 'A1' that contains Formula "='Sheet1'!L2". The formula equates to 1. Is there a way to replace the function to hold '1' and erase the input formula with PHPExcel?
If not, that would be really handy for optimization, and to remove the excessive problems that arise from ->getOldCalculatedValue/getCalculatedValue/->setPreCalculateFormulas().
Thanks
Logically
$objPHPExcel->getActiveSheet()
->setCellValue(
'A1',
$objPHPExcel->getActiveSheet()
->getCell('A1')
->getCalculatedValue()
);
Though I fail to see how it can optimize anything, because you still have to calculate the formula to get the value anyway