Hello,
The setCellValue method replaces a cell value keeping all styles (this method works with text contents). Please note that this method calls addCell internally:
$this->addCell($contents, $position, array(), array('useCellStyles' => true));
Maybe you need to use addCell with specific options such as isFunction? Or use addFunction directly? Or the new content can't be added into that specific cell position due to external dependencies in the XLSX?
The current stable version of phpxlsx doesn't update the calcChain.xml file. If ithis file is removed, MS Excel regenerates it when opening the XLSX.
If you send to contact[at]phpdocx.com an XLSX sample and the code you are running that illlustrates your issue. We'll check it.
Regards.