HyperFormula throw error “Incorrect array size” when I try to use formula with range from greater to lower cell.
E.g.
=sum(A1:A2)
- work
=sum(A2:A1)
- throw error
JS fiddle example - https://jsfiddle.net/DenialT/dL94xeuz/
I found, that it happens because height
is calculates as 0 in AbsoluteCellRange.ts
(line 238).
It formulas is
this.end.row - this.start.row + 1
and if I replace it to
Math.max(this.end.row, this.start.row) - Math.min(this.end.row, this.start.row) + 1
it prevent error, but not calculate formula correctly.