CELL in ONLYOFFICE: Inspect a Referenced Cell Safely
Inspect cell location, contents and type with explicit references, and understand source-level caveats for width, filename and omitted references.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: with a number in B3, =CELL("address",B3) has the source-supported target $B$3, =CELL("row",B3) gives 3, and =CELL("col",B3) gives 2. Supply an explicit reference so the question does not depend on selection or editing context.
Syntax and what CELL inspects
=CELL(info_type, [reference])
The first argument is a quoted information selector. The optional second argument identifies the cell to inspect. CELL does not change that cell. Its result may be text, a number, a referenced value or, for some selectors in the checked source, an array.
The official reference lists address, col, color, contents, filename, format, parentheses, prefix, protect, row, type and width. These answer different questions: contents reads the value, type categorizes it, and format concerns display formatting. A percentage-formatted numeric value remains a value rather than text.
The help says an omitted reference refers to the last changed cell. The tagged implementation has selector-specific fallback paths, including selection for address and calculation context for row/column. Do not generalize the help wording into a reliable formula-cell or last-edit rule. Every worked example here supplies the reference explicitly.
Set up deterministic same-sheet examples
Create a blank sheet named CellAudit. Enter the following data, keeping the formulas in E so there is no self-reference:
| Cell | Entry |
|---|---|
| B3 | Numeric 42 |
| B4 | Text parcel |
| B5 | Leave genuinely empty |
| B6 | =6*7 |
Use E3:E8 for these checks:
| Formula | Source-supported target | Meaning |
|---|---|---|
=CELL("address",B3) |
$B$3 | Absolute cell address |
=CELL("row",B3) |
3 | One-based row |
=CELL("col",B3) |
2 | One-based column |
=CELL("contents",B3) |
42 | Numeric value |
=CELL("contents",B4) |
parcel | Text value |
=CELL("contents",B6) |
42 | Formula result, not formula text |
The last result depends on B6 being calculated. It does not return the characters =6*7. If the goal is formula inspection, use an appropriate formula-text tool rather than treating contents as a formula exporter. These are code/documentation predictions; no application readback was collected.
Distinguish empty, text and numeric cells
In G3:G6, use:
| Formula | Source-supported target |
|---|---|
=CELL("type",B3) |
v |
=CELL("type",B4) |
l |
=CELL("type",B5) |
b |
=CELL("type",B6) |
v |
The letters mean value, label and blank. The implementation treats a string as l and a true empty cell as b; other value types fall into v. Therefore v is not a promise that the cell is a valid number. Use ISNUMBER when a calculation requires a number, or ISBLANK when you specifically need genuine emptiness.
A formula returning empty text is not the same thing as an untouched empty cell. To explore that distinction separately, place ="" in B7 and use =CELL("type",B7): the source predicts l because the result is a string. Keep B5 genuinely empty as the control.
Advanced: audit a range without assuming every selector is identical
For location selectors, the inspected code reads the first row/column of the supplied range. Thus =CELL("address",B3:C6) targets $B$3, and corresponding row/col selectors target 3 and 2. This is useful when checking where an imported block begins.
The help describes upper-left behavior generally, but the source branches for contents and type consume reference values differently. This guide does not claim that every selector applied to every multi-cell reference has been verified. For a reproducible per-cell audit, fill explicit single-cell formulas down instead: enter =CELL("type",B3) in H3 and fill through H7. Relative references then inspect B3,B4,B5,B6,B7 individually.
Using ROW or COLUMN may be simpler if only position is needed. CELL is useful when the selector itself is the subject of an audit, not as a replacement for every basic reference function.
Formatting and environment-dependent selectors
Treat these as context-sensitive checks requiring an actual workbook and client test:
- width: help describes a rounded width, but the inspected source constructs two elements: rounded width and a boolean indicating default width. Do not claim a single scalar or a verified spill shape from that code alone.
- filename: the source constructs a workbook-title-and-sheet string and explicitly does not include a path. Do not teach it as a portable local-file-path extractor. No private filenames or paths are needed for the examples above.
- protect: the source reads the cell’s locked style state. That does not by itself prove that worksheet protection is enabled or that a user cannot edit the cell.
- color: this concerns the negative-number format color, not a general cell fill-color reader. prefix concerns text alignment; it is not simply the first typed character.
- format and parentheses: results depend on the actual number-format code and the format parser. Do not promise identical format codes across locales or applications without checking the target workbook.
These are narrow implementation observations, not claims that a feature is universally supported or unsupported on desktop, web or mobile. The inspected code alone cannot establish refresh timing after a style change, GUI recalculation behavior, or cross-sheet formatting parity.
Errors, circular references and compatibility
The selector is text, so use straight quotes around it. The source lowercases the selector and checks recognized values; an unrecognized selector such as =CELL("unknown",B3) is predicted to return #VALUE!. That is distinct from a missing or broken reference, whose handling can occur in the formula parser before this calculation.
Do not use CELL(“contents”,…) to read the cell containing the same formula: that creates a dependency cycle rather than a useful inspection. Keep audit formulas outside the inspected input block. Also avoid replacing a reference with a numeric literal and assuming it will be interpreted as a cell address.
The name CELL exists in other spreadsheet products, but selectors, filename output, omitted-reference context and array behavior can differ. The official help labels CELL an array formula; that label is not proof that every simple call needs an array-entry shortcut. No keyboard-entry or spill workflow was tested here.
References checked October 18, 2026
- Official CELL help: selectors, optional-reference description and formatting table.
- Official tagged information-function source: selector branches and context-sensitive behavior.
Availability, version scope and verification
This function is currently documented in ONLYOFFICE’s rolling Spreadsheet Editor help. Its original introduction version/date and final supported-version endpoint are not established here. A legacy spelling does not by itself mean that a function is deprecated or retired.
The implementation evidence is official SDKJS tag v10.0.0.169, pinned to commit 3679e0375a758d7dc59d31337a45461be3525ed8. That identifies the inspected source revision, not proof of identical behavior in every Docs server, Desktop Editors build, mobile client or exported workbook. Sources were checked on October 18, 2026.
These examples were not tested in the application. Numerical answers in this guide are independently calculated mathematical targets; implementation-specific cases are explicitly source-predicted. No ONLYOFFICE calculation engine was executed for these examples. No native screenshot, recalculated workbook or successful GUI workflow is claimed. Formulas use English names and comma separators; a localized installation may require different separators or translated names.