PhpSpreadsheet icon indicating copy to clipboard operation
PhpSpreadsheet copied to clipboard

Consequetive "=" in a value passed taken as datatype FORMULA which throws an error.

Open jaiminmoslake7020 opened this issue 5 years ago • 2 comments

This is:

- [Y] a bug report
- [ ] a feature request
- [ ] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)

What is the expected behavior?

Assume a cell value is "=============". It considers datatype for this "FORMULA" which is wrong and throws error. It should consider it as STRING.

version 0.2.9 PHPOffice src/PhpSpreadsheet/Cell/DefaultValueBinder.php LINE 58

    } elseif ($pValue[0] === '=' && strlen($pValue) > 1) {
            return DataType::TYPE_FORMULA;
    }

What is the current behavior?

Report Data!L1457 -> Formula Error: An unexpected error occured Traces:#0 
/var/app/current/_protected/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Worksheet.php(756): PhpOffice\PhpSpreadsheet\Cell\Cell->getCalculatedValue()

What are the steps to reproduce?

Just pass "===============" as any cell value.

Which versions of PhpSpreadsheet and PHP are affected?

version 0.2.9 PHPOffice

jaiminmoslake7020 avatar Jan 10 '20 05:01 jaiminmoslake7020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue for you, please try to help by debugging it further and sharing your results. Thank you for your contributions.

stale[bot] avatar Mar 10 '20 06:03 stale[bot]

Will be fixed by 4073.

oleibman avatar Jun 26 '24 06:06 oleibman