Contact

SHEETS in Collabora Office: Count Workbook Sheets or a Referenced Sheet Span

Information Intermediate Collabora Office Calc

Use Collabora SHEETS to distinguish workbook tab count from cells and to audit a three-dimensional reference.

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

Quick answer: =SHEETS(Sheet1.A1:Sheet3.G12) has documented result 3 when Sheet1, Sheet2 and Sheet3 appear in that consecutive order. The function counts sheets, not the cells inside the rectangle.

Syntax and omitted reference

=SHEETS([Reference])

Reference is optional. Without it, SHEETS() returns the number of sheets in the current document. With a reference, it counts the sheets spanned by that reference. A single-sheet cell or rectangular area therefore counts as one sheet regardless of its size.

The dedicated Collabora example uses a three-dimensional range from Sheet1 through Sheet3. The corroborating current source counts the inclusive difference between the endpoint sheet indices. The worksheet tab order is therefore part of the setup.

SHEETS is distinct from SHEET, which reports a sheet index. It also differs from ROWS and COLUMNS, which describe dimensions within a referenced area.

Example 1: build an explicit four-sheet workbook control

In a test workbook, arrange exactly four sheets in this order: Sheet1, Sheet2, Sheet3, Summary. On Summary, enter =SHEETS() in A2. Its independent structure-model target is 4.

Enter =SHEETS(Sheet1.A1:Sheet3.G12) in A3. The target is 3 because the span includes Sheet1, Sheet2 and Sheet3 but excludes Summary.

These are setup instructions for a reproducible fixture, not a claim that such a workbook was opened and executed in the target application. The actual workbook must have the stated sheets and ordering for the expected results to apply.

Example 2: distinguish cell area from sheet count

Use =SHEETS(Sheet1.A1) and =SHEETS(Sheet1.A1:G12). Each independent target is 1. Expanding a reference from one cell to 84 cells on the same sheet does not increase the sheet count.

The documented three-sheet rectangle has seven columns and twelve rows on each sheet, or 252 cell positions across the whole span. SHEETS still returns three, because its output unit is sheets.

Label the result accordingly. A total labeled “Records” or “Populated cells” would be misleading even if the numerical value happens to match a separate count in one workbook.

Advanced application: audit changes in sheet order

Starting from the four-sheet fixture, inserting a new sheet Extra between Sheet1 and Sheet3 makes the endpoint span contain four sheets, provided the reference still targets those same named endpoints. The entire workbook then contains five.

Inserting Extra after Summary instead increases SHEETS() to five while the Sheet1-through-Sheet3 span remains three. Position matters for a span even when the total sheet count is the same.

These structure-model comparisons make a useful test when a workbook’s formulas use three-dimensional references. They do not certify every reference rewrite performed during native insertion, moving, copying or file import.

Advanced application: separate visibility from existence

The current source’s no-argument path reads the document table count, while its range path uses sheet indices. Neither calculation filters by whether a sheet is visible.

Thus hiding Sheet2 in the stated fixture should not remove it from the documented span’s structure-model count. This is a source-based expectation, not a newly performed GUI hide/show test. A visible-tab inventory is a different task and should not be inferred solely from SHEETS.

Keep both the total workbook count and any important span count in an audit area. A total alone cannot reveal whether a newly inserted sheet lies inside a particular referenced interval.

Errors and troubleshooting

A text string containing a sheet name is not the same as a sheet reference. The source expects reference stack types for its parameter; ordinary non-reference values follow an illegal-parameter path. Exact native error wording is unverified.

Do not assume that sheets named Sheet1 and Sheet3 have exactly one intervening sheet. Their names are labels, not a guarantee about current tab positions. Check the actual ordered structure, and use quoted sheet-name syntax where names contain spaces. External references, unions and import-specific rewrites are outside these simple local controls.

Availability and verification

The exact function is documented in Collabora Office 26.04 desktop help. This function’s cited help snapshot was retrieved on 2026-10-13 and hash-verified on October 15, 2026. Desktop documentation does not establish Online or mobile support. First introduction and last functioning release are unknown in this evidence.

No native Collabora Office execution occurred. Worked results are independent logical, calendar, structural or mathematical expectations. Formulas use English names and semicolon argument separators.

Implementation details are corroborated by Collabora current source, retrieved October 15, 2026. This moving-main snapshot is not a pinned 26.04 binary or an application test.

References