Closed marlocorridor closed 5 months ago
StringValueBinder is working as expected. See https://phpspreadsheet.readthedocs.io/en/latest/topics/accessing-cells/#using-value-binders-to-facilitate-data-entry. In particular, "By default, the StringValueBinder will cast any datatype passed to it into a string. However, there are a number of settings which allow you to specify that certain datatypes shouldn't be cast to strings, but left "as is":". If you want formulas to not be converted to strings, you must specify
$stringValueBinder->setFormulaConversion(false)
Closing. Person reporting the issue indicated agreement with this assessment in the linked PR.
This is:
What is the expected behavior?
Format cells to formula type when starts with "=" and
convertFormula
property is set totrue
What is the current behavior?
Cell value prefixed with qoute when starts with "=" and
convertFormula
property is set totrue
What are the steps to reproduce?
PhpOffice\PhpSpreadsheet\Cell\StringValueBinder
as Binder."=ROW()-1"
What features do you think are causing the issue
Does an issue affect all spreadsheet file formats? If not, which formats are affected?
~ not sure
Which versions of PhpSpreadsheet and PHP are affected?
1.29.0