ROWS in Calligra Sheets: Count Rows in a Cell Range
Learn ROWS in Calligra Sheets with official syntax, worked reference examples, geometry calculations, limitations, and Excel comparison.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Availability and version history
- Introduced: Documented by 26.08.2; original introduction not established.
- Availability: Supported in Calligra Sheets 26.08.2, based on the function-specific registration.
- Scope: The official application listing provides Linux installation; other packaged builds are unverified here.
- Checked: October 14, 2026. Documentation/source check; no new native test in Calligra Sheets 26.08.2.
Quick answer
ROWS returns the number of rows spanned by a reference, whether or not those rows contain data. A simple example is ROWS(A1:C3), expected to return 3. Use ROWS to determine the height of a range—not to count filled cells or obtain the row index of a cell.
When to use it: audit the size and location of imported tables, calculate an inclusive span, create structure-aware formulas, or check that references point to the intended part of a sheet. These calculations use cell positions, not cell contents.
Exact documented syntax and version scope
=ROWS(reference)
Argument and defaults: Exactly one required cell reference or rectangular range. There is no zero-argument default in the pinned registry; one argument is required. The official help displays the literal syntax ROWS(reference); the release registry is authoritative for whether that displayed parameter can be omitted. reference here is a cell/range reference, such as A1:C3, not a promise that the literal quoted text "A1:C3" will be resolved as a reference. Although the official XML marks the parameter’s input type as String, the pinned C++ implementation uses parsed reference-region coordinates. Do not confuse UI parameter metadata with guarantees about quoted-string evaluation.
Version/source: The checked registry and implementation are from Calligra 26.08.2, released 2026-10-08, pinned at commit 72123cc643f6625351139e7df294544255a1056f. The English stable-KF6 KDE handbook and matching release XML/source were checked on 2026-10-11. The handbook is not a live test of all installations, languages, extensions or downstream Linux builds. Registry presence proves a function is registered in shipped source, not that a particular package loaded the module or that all edge cases behave identically.
Source-specific proof: reference.cpp lines 106–110 (setParamCount(1), setAcceptArray(), setNeedsExtra(true)) and implementation lines 580–590. The release-pinned help XML uses reference.xml lines 188–201.
Locale and formula entry: Start with = in a formula cell. All primary examples below contain only one argument, so they avoid separator ambiguity. The KDE English handbook uses semicolons to separate multiple arguments in other functions; your installation may display localized function names or separators. Reference notation can also vary with sheet settings. Use a genuine range reference rather than a typed text string.
Reproducible worksheet: six reference examples
- Open a blank Calligra Sheets sheet. You may leave all the input referenced cells empty; the coordinate calculation does not depend on their stored values.
- Enter the following formulas one per cell into H2:H7 (the H column is just a convenient results area). You do not need to type the reference strings into a separate column; each formula contains its own actual reference.
- Observe the resulting values and compare with the independently calculated expectations below. They are expected outputs, not observed results from a native Calligra 26.08.2 session.
| Formula cell | Formula to type | Expected value | Interpretation |
|---|---|---|---|
| H2 | =ROWS(A1:C3) |
3 | A1:C3; Height includes both endpoints. |
| H3 | =ROWS(D2) |
1 | D2; Height includes both endpoints. |
| H4 | =ROWS(B2:F6) |
5 | B2:F6; Height includes both endpoints. |
| H5 | =ROWS(Z1:AB1) |
1 | Z1:AB1; Height includes both endpoints. |
| H6 | =ROWS(C2:C10) |
9 | C2:C10; Height includes both endpoints. |
| H7 | =ROWS(E5:G5) |
1 | E5:G5; Height includes both endpoints. |
How these examples were checked: An independent Python reference-coordinate evaluator parsed ordinary A1 addresses and rectangular A1:C3 addresses, converted column letters to base-26 indices, and computed start/end coordinate differences inclusively. The expected results were compared with the published KDE examples and the pinned C++ branches. No native Calligra Sheets execution was performed.
Four practical and advanced patterns
Count the cells in a rectangular block
Formula: =ROWS(B2:F6)*COLUMNS(B2:F6). Expected result: 25. Five rows multiplied by five columns gives 25 cell positions, including blanks.
Count 100 rows, not filled entries
Formula: =ROWS(A1:A100). Expected result: 100. The endpoints are inclusive; blank cells still belong to the range.
Single-row range is still one row
Formula: =ROWS(Z1:AB1). Expected result: 1. A range can span three columns and one row.
Compare a block height with one cell
Formula: =ROWS(D2). Expected result: 1. ROWS counts range height; it does not return D2’s row number 2.
Do ranges need values in every cell?
No. The checked code operates on the coordinates of a reference/range. The result reflects the reference geometry, not how many cells in it are nonempty. For counting populated values, investigate functions such as COUNT or COUNTA instead, with their own data-type rules. The links in this paragraph point to KDE’s official function chapter.
Optional arguments and likely mistakes
This function requires one reference argument. An empty call =ROWS() is not within the documented/registered signature; do not invent a numeric default.
- A cell value is not its position.
=ROWS(A1:C3)describes a location; it does not read the cell’s visible number as a dimension/index. These examples remain meaningful when their targets are empty. - Reference text is not necessarily a reference. Avoid replacing
A1:C3with"A1:C3". The XML’s parameter classification should not be interpreted as documented runtime support for quoted strings. Use direct reference syntax. - Ranges include the start and end. For a rectangular span, calculate the coordinate difference plus one—not merely the difference.
- A discontiguous union, named range, imported structured reference or array constant may follow different parser rules. No native results for such cases were obtained, so this guide does not promise equivalence to Excel’s support for those forms.
- Broken references and syntax errors: check
=and paired parentheses, the worksheet’s actual reference notation, and that the reference is a valid single rectangular region. The pinned implementation returnsValue::errorVALUE()whenrow1orrow2is −1, indicating invalid boundary coordinates. Exact UI messages for malformed references need runtime confirmation. - Numbers appear incorrect or truncated: ensure cells are formatted as numbers and the output column is wide enough. A different result from a current install should be recorded with the software version, package source, locale and formula—checked against these documented expectations.
Differences from Excel, LibreOffice and other spreadsheet apps
Microsoft Excel: Excel documents ROWS(array) and allows arrays, array formulas and cell-range references. Both products agree on ordinary rectangular references such as C1:E4, which spans four rows, but the checked Calligra implementation derives size from stored reference boundaries. Array constants/spill behavior were not tested. This comparison is grounded in the linked vendor documentation, not side-by-side execution. Excel documentation may use commas where KDE’s English help uses semicolons in multi-argument examples; a function with a single argument does not exercise that distinction.
LibreOffice Calc / Google Sheets: familiar function names exist, but cross-version parser details, array/spill behavior and error handling were not independently executed in this batch. Test workbook-specific edge cases in each application before migration; avoid assuming an Excel-only dynamic array example will behave the same in Calligra.
Alternate names: The Calligra 26.08.2 release registry gives ROWS no registered alternate names.
Related functions and checked official resources
For a position instead of a width/height, use COLUMN or ROW; for a count of positions instead of a single index, use COLUMNS or ROWS. See KDE’s related reference entries: ROW; COLUMNS. Both the link destinations and the #ROWS anchor are in the checked English KDE chapter.
- Official KDE handbook: ROWS — published purpose, syntax and examples, consulted 2026-10-11.
- Pinned Calligra 26.08.2 reference function registration — official registry parameter count and module configuration, consulted 2026-10-11.
- Pinned Calligra 26.08.2 C++ implementation — coordinate calculation and invalid-coordinate branch, consulted 2026-10-11.
- Pinned Calligra 26.08.2 reference.xml — official English help text and related-function names, consulted 2026-10-11.
- KDE Gear 26.08.2 release announcement — release date, consulted 2026-10-11.
- Microsoft Excel documentation for ROWS — cross-software signature and behavior context, consulted 2026-10-11.
Native Calligra execution: not performed. Reference geometry and examples were checked against documentation, pinned source and independent calculations.