I created a simple Excel sheet which sums up 2 values.
Cell A1 contains a placeholder $val1$
Cell A2 contains a fixed number. for example 2
Cell A3 sums up Cell A1 and A2.
$xlsxStructure = new XlsxStructure();
$xlsxStructure->parseXlsx($datasource);
$xlsx = new CreateXlsxFromTemplate($xlsxStructure);
$xlsx->replaceVariableText(array('val1' => 6));
$xlsx->saveXlsx($newXlsxFile);
After using the above code, the calculated value still shows the value 2 instead of 8.
Currently you need to manually click into the cell to update it.
I fixed this issue locally for now by adding attributes (fullCalcOnLoad & forceFullCalc) to the calcPr node in the workbook dom. this way the functions get evaluated on workbook load.
Unfortunately this way all functions get recalculated every single time the workbook is loaded. Instead all functions should be reevaluated on saving.