Replies: 5   Views: 91
Function replacement
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpxlsx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpxlsx version and check the Documentation available.

Posted by admin  · 20-02-2024 - 09:04


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] an XLSX sample and the code you are running that illlustrates your issue. We'll check it.