This repository was archived by the owner on Jan 2, 2019. It is now read-only.
Changing sheet title containing single quote doesn't update all formulas referencing that sheet #196
Open
Description
If I have a sheet title with a quote mark in it - for example, Sheet 'Q
- and a cell (let's say B1) with a formula in it that references that sheet title:
SUM('Sheet ''Q'!A1:A5)
Then calling $worksheet->setTitle("NewName")
leaves formulas with references to the old sheet name (Sheet 'Q
) in them.
This seems to be a result of the comparison in the updateNamedFormulas
function in ReferenceHelper.php. $oldName
contains a version of the formula without the extra ' character, whereas $formula
(which is populated by calling $cell->getValue()
) does have that escaped version in it. As a result, they do not match even though they should, and the formula doesn't get updated.