-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Description
It took me a while to break down understand what is happening here and I hope I got it correctly. If an Excel contains a formula with certain array functions, e.g. MIN(FILTER(HSTACK(A2), HSTACK(A2)<>0,0))
the result will look like
<f t="array" ref="A1">MIN(_xlfn._xlws.FILTER(_xlfn.HSTACK(A2), _xlfn.HSTACK(A2)<>0,0))</f>
I don't understand the idea of the array
attribute here since MIN
returns a scalar. But it is there and this is a problem, because of this piece of code in Cell/Cell.php
if (
!is_array($result)
&& $calculation->getInstanceArrayReturnType() === Calculation::RETURN_ARRAY_AS_ARRAY
&& $oldAttributesT === 'array'
&& ($oldAttributesRef === $coordinate || $oldAttributesRef === "$coordinate:$coordinate")
) {
$result = [$result];
}
At least in this case the conversion from scalar to array is wrong. The excel file used to recreate the XML is attached.
Metadata
Metadata
Assignees
Labels
No labels