Bug 162548 - The result of implicit iteration in array context does not use the maximum size of its operands
Summary: The result of implicit iteration in array context does not use the maximum si...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL: https://docs.oasis-open.org/office/Op...
Whiteboard:
Keywords:
Depends on:
Blocks: Cell-Formula
  Show dependency treegraph
 
Reported: 2024-08-21 21:49 UTC by Regina Henschel
Modified: 2024-12-13 05:47 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2024-08-21 21:49:07 UTC
List item 2.2.2) in section 3.3 Non-Scalar Evaluation (aka 'Array expressions') in ODF 1.3, part 4, states:
<quote>
The result matrix is rectangular, sized with the maximum number of rows and columns from all non-scalar arguments.
</quote>
And the standard gives an example in Note 8:
<quote>
={1;2}+{3;4;5}	=> {4;6;#N/A}
</quote>

This formula in matrix mode (Ctrl+Shift+Enter) results in 1 row with the two elements 4 and 6 in LibreOffice.

To get the number of columns independent from the marked area and from spill behavior use the COLUMNS function:
Enter
=COLUMNS({1;2}+{3;4;5})
and finish with Ctrl+Shift+Enter.

LibreOffice results value 2, Excel results value 3.
Comment 1 Regina Henschel 2024-08-21 21:51:57 UTC
BTW, depending on your local you might need \ instead of ; as column separator in Excel. The column separator in LibreOffice is specified in Tools > Options > Calc > Formula, section "Separators".
Comment 2 ady 2024-08-21 23:22:48 UTC
Confirmed in recent master, in LO 3.3 and in AOO 4.1.15.

Other spreadsheet tools I tested behave as Excel.