Reputation: 1089
I am using Laravel Excel Maatwebsite package. When I try to read to excel I am getting this error:
Formula Error: Unexpected operator '='
How can disable read formula in this package.I want to only get field value from excel ?
Thanks
Upvotes: 0
Views: 2919
Reputation: 111
If the calculate config is false
and you face the problem yet, you should extend PhpOffice\PhpSpreadsheet\Cell\StringValueBinder
class and implement Maatwebsite\Excel\Concerns\WithCustomValueBinder
interface in your class.
It cause PhpSpreadsheet behave with the data in sheet as string.
Package Document
Upvotes: 0
Reputation: 5876
According to the documentation you can enable / disable calculating formulas like this:
// Enable calculation
$reader->calculate();
// Disable calculation
$reader->calculate(false);
Upvotes: 1