Contact

Collabora Office WRAPCOLS: Column Groups and Padding

Lookup Intermediate Collabora Office Calc

Reshape a one-dimensional list into fixed-height columns with explicit padding, exact dimensions and source-checked input restrictions. Scoped to the new Linux desktop source build.

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

WRAPCOLS reshapes a one-dimensional list into groups that fill each column before continuing to the next. Wrap_count determines the result’s height. When the last group is incomplete, Pad_with determines the extra cell values.

Syntax and vector requirement

=WRAPCOLS(Range; Wrap_count [; Pad_with])

Range must be one row or one column. The checked evaluator rejects a genuinely two-dimensional matrix; it does not silently flatten it first. Use a small positive integer Wrap_count. Pad_with is optional and defaults to a NotAvailable error, shown as #N/A in the help.

Step by step: five values in groups of two

Enter A2:A6 as the numbers 10, 20, 30, 40, 50, one per cell. Then use:

=WRAPCOLS(A2:A6;2)

The independent/source-derived result is:

10   30   50
20   40   #N/A

The function consumes values in their original order. Each column takes two consecutive values, and the final unfilled position contains an error. #N/A in this layout represents a typed error, not the text to enter into a source cell.

A horizontal vector containing the same values in D2:H2 produces the same result with =WRAPCOLS(D2:H2;2). The input vector’s orientation does not change the wrapping direction selected by the function name.

Choose numeric or text padding deliberately

=WRAPCOLS(A2:A6;3;0)

With Wrap_count 3 and numeric pad 0, the expected matrix is:

10   40
20   50
30    0

Changing the last argument to "-" places a text hyphen in the otherwise unfilled cell. That is different from a zero and different from the default error. It can make a presentation clearer, but it changes the data type of the padding.

Padding applies only beyond the end of the list. It is not an instruction to replace an existing blank, error or zero inside the input. A source error remains a source-data issue rather than becoming the chosen pad merely because Pad_with was supplied.

Calculate the shape before using the result

For N input values and count k, the source allocates k rows and ceil(N/k) columns. Five values with k=2 therefore occupy 2×3 cells, leaving one padding position. With k=3 they occupy 3×2 cells, again leaving one pad.

With k=5, the result is one column of five values and no padding. With k=6, it is one column of six positions: the original five values followed by one default error. A wrap count larger than the list does not shrink the requested height to five.

Advanced: group a list without inventing records

For a fictional list of sequential sample measurements, the wrap count can define a reporting group size. But reshaping does not verify that every consecutive group belongs to the same experiment, period or category. Retain source identifiers separately if the grouping has operational meaning.

Use the identity output cell count - N to check how many padding positions are introduced. In the five-value, count-two example it is 6-5 = 1. A numeric pad of zero can affect an average or a count downstream; a visible hyphen can affect type-sensitive formulas; an error pad can propagate through arithmetic. Choose according to the intended analysis rather than hiding incompleteness automatically.

WRAPROWS groups in the other orientation. For the same list, count and padding, the two mathematical layouts are transposes: WRAPCOLS uses k rows, whereas WRAPROWS uses k columns. That relationship does not by itself verify a composed formula or array-entry workflow in the application.

Invalid inputs and bounded use

With J2:K3 containing rows [1,2] and [3,4], =WRAPCOLS(J2:K3;2) reaches internal IllegalArgument because both input dimensions exceed one. =WRAPCOLS(A2:A6;0) reaches internal IllegalParameter for zero count. These are exact-source predictions, not native display observations.

This guide deliberately uses positive small integer counts. It does not assert a safe negative-count path, fractional coercion rule or behavior for oversized allocations. Correcting an invalid two-dimensional input requires choosing a flattening order explicitly; it is not just a formatting change.

Array workflow

The help describes array entry and a Ctrl+Shift+Enter hint. The evidence here establishes the returned matrix’s geometry and values; it does not verify that shortcut, spill placement, resizing or blocked-output handling in the new Qt desktop. Keep output space and source ranges separate when applying the instructions in an actual workbook.

Product scope and verification

This guide covers the new Collabora Office desktop for Linux, source build coda-26.04.4.3-1, commit 81339d176148d0d5c81ff05d82540f58f8aaa117, mapped from the vendor’s Linux Flathub package. The 26.04 WRAPCOLS help and exact evaluator source were checked on October 18, 2026. The desktop announcement and package manifest explain the narrow product mapping; the manifest is a mutable source publication, not proof of an installed binary.

No Collabora runtime or other spreadsheet engine was executed. The matrices are independent/source-derived expectations, and the typed input setup is instructional. No native screenshots or interface tests are represented. Classic, Online, CODE, mobile, Windows and macOS parity is not established.

The original Collabora introduction release is unknown from the checked evidence. The help identifies COM.MICROSOFT.WRAPCOLS and places the function outside OpenFormula 1.3; that compatibility limitation is not a retirement or deprecation notice. Import/export and recalculation in other products were not tested.