Skip to content

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

@jaiminmoslake7020

Description

@jaiminmoslake7020

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions