Contact

Collabora Office CHOOSEROWS: Select rows in a chosen order

Lookup and Reference Intermediate Collabora Office Calc

Build a reordered row array in the new Linux desktop source build, preserve column width and handle negative, repeated and invalid row indices.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: =CHOOSEROWS(A1:C4;3;1) returns source row 3 followed by source row 1. It produces 2 rows × 3 columns. The header is an ordinary row: include position 1 explicitly when you want it in the result.

Syntax and defaults

=CHOOSEROWS(Array; Row_1 [; Row_2 ...])

The source can be a range or array. Supply at least one integer row position. Positive positions count from the top, starting at 1; negative positions count back from the bottom, with −1 identifying the last row. Output rows follow the order you supply, and repeats are allowed. Official CHOOSEROWS help.

There is no automatic header detection, filtering condition or sort key. An omitted row selector is rejected in the inspected implementation. Use whole-number selectors rather than relying on its approximate truncation of fractional numerical arguments. The formulas use semicolons as argument separators.

Worked example: inspect one record beside its header

In a fresh sheet enter:

Row A B C
1 Item Region Units
2 Pen East 12
3 Pad West 8
4 Clip East 15

For =CHOOSEROWS(A1:C4;3;1), the independently selected output is:

Output A Output B Output C
Pad West 8
Item Region Units

This intentionally puts the header second to demonstrate order. In a reader-facing report, =CHOOSEROWS(A1:C4;1;3) puts the header first and Pad second. Each selected row is copied across all three columns. The operation does not sum the Units field or compare Region labels.

Positions are relative to the supplied array. If the source were A2:C4, selector 1 would identify Pen, not the sheet’s first row. A sheet row number and a position inside a range are only the same when that range begins on row 1.

Advanced use: last record plus a reference row

=CHOOSEROWS(A1:C4;-1;1) independently produces:

Output A Output B Output C
Clip East 15
Item Region Units

Negative indexing is useful when the reference range has a meaningful last record. It does not locate the last nonempty row outside that range. If you extend the source to include trailing empty rows, −1 selects the last included row, which may be empty.

For a repeated template record, =CHOOSEROWS(A1:C4;2;2) yields two copies of Pen | East | 12. The source remains unchanged. This can help build a comparison layout, but the two output rows are not independent measurements and should not accidentally be counted twice in a total. =CHOOSEROWS(A1:C4;1) gives the header alone, a 1 × 3 array.

Errors and array limits

Selector 0 and positions beyond the four-row range, such as 5 or −5, follow an internal IllegalParameter path. A missing selector also fails. Native UI error spelling and keyboard-entry behavior have not been observed in this product build.

The shared evaluator can consume a selector matrix, reading its columns from left to right and each column from top to bottom. Its string/empty test incorrectly uses dimensions instead of current element coordinates. Consequently, do not treat numeric-looking text, mixed selector arrays or blank selector cells as a documented coercion contract. The examples use plain integer selectors, where the bounds and copy rules are clear.

Selected genuine blanks remain empty matrix cells internally. Text, numerical values and error-bearing cells are copied through the value-copy helper; this is not evidence that formatting, row height or cell validation is cloned. Reserve enough room for the expected shape, but do not infer a tested automatic spill workflow from an array-valued result.

See the pinned ScChooseRows / ScChooseColsOrRows evaluator for the selection order, bounds and shared implementation. CHOOSECOLS changes the other dimension and has a distinct position count.

Product scope, compatibility and evidence

This guide covers the new Collabora Office desktop for Linux, using the Flathub source tag coda-26.04.4.3-1 and commit 81339d176148d0d5c81ff05d82540f58f8aaa117. The official desktop release notes and Linux package manifest identify that product/build. The package manifest is a dated observation from October 18, 2026, rather than an installed-binary check.

The 26.04 function help and exact evaluator source were inspected on October 18, 2026. Expected examples were independently calculated; no Collabora application was run. Output grids describe evaluator results, not a verified spill or keyboard-entry workflow. Classic, Online/CODE, other operating systems and file-format round trips require their own checks.

The help identifies this function as outside OpenDocument 1.3 and uses the extension name COM.MICROSOFT.CHOOSEROWS. That does not establish lossless export to every spreadsheet format. The first Collabora release introducing it is not established by these sources. It is documented here as available, with no cited retirement or deprecation notice; an undocumented introduction date is not a deprecation claim.

  • CHOOSECOLS: select and reorder columns
  • DROP: remove leading or trailing rows