Contact

ONLYOFFICE ERROR.TYPE Function: Identify Spreadsheet Errors by Code

Information Intermediate ONLYOFFICE Spreadsheet Editor

A step-by-step ONLYOFFICE ERROR.TYPE guide with a reproducible error-audit worksheet, codes 1–8, precise error handling and testing caveats.

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

Quick answer: ERROR.TYPE converts a real spreadsheet error value into its documented number. For example, =ERROR.TYPE(1/0) is expected to return 2, identifying division by zero. It does not repair the underlying error. If its argument is not an error, the vendor documents #N/A as its result. This is useful when an inventory import has several different failures and a single ISERROR flag is not detailed enough.

The ONLYOFFICE ERROR.TYPE reference supports the syntax and number mapping below. The worked results are independently reasoned or arithmetically checked, not observed in ONLYOFFICE.

Availability and version history

  • Introduced: The original introduction version and date are not established by the official sources checked.
  • Availability: Documented in the current ONLYOFFICE Spreadsheet Editor help; no final working-version endpoint is established.
  • Scope: Docs and Desktop Editors release separately. This unversioned help does not establish availability in every older build, mobile client or deployment.
  • Checked: October 14, 2026, against the official function reference. Documentation check; not a new native test.

Syntax, argument types and defaults

=ERROR.TYPE(error_val)
Argument Required? Input Default
error_val Yes A spreadsheet error expression, or a reference such as A2 to a cell that evaluates to an error. None specified in the vendor reference.

There is one argument, not a pair of error and replacement arguments. It evaluates the error value to a numeric category; for a non-error, its documented output is #N/A. The vendor does not document an omitted-argument default. Do not type an error name in quotation marks expecting it to be treated as an error: "#DIV/0!" is a string.

The complete codes documented by ONLYOFFICE

Underlying spreadsheet error ERROR.TYPE result How to interpret it
#NULL! 1 Null-intersection error.
#DIV/0! 2 An operation attempted to divide by zero.
#VALUE! 3 Incompatible input value/type.
#REF! 4 Invalid reference.
#NAME? 5 Unrecognized name or function.
#NUM! 6 Invalid numeric operation or numeric argument.
#N/A 7 Not-available value (a real error, not text).
#GETTING_DATA 8 A listed data-loading error.
Anything else #N/A No recognized spreadsheet error was supplied.

Source: ONLYOFFICE’s code table, accessed 2026-10-13. The table describes mapping, not which errors are easy to provoke in a given edition. In particular, code 8 is documented and corroborated by the pinned source below, but no native #GETTING_DATA fixture was produced. The vendor table does not provide a code for every newer Excel-specific error message.

Reproducible exercise: audit formula outcomes

In a blank worksheet, put the following values/formulas in A2:A6. For entries beginning with =, enter them as formulas rather than as text. Then enter =ERROR.TYPE(A2) into B2, and fill down through B6. Column B outputs below are expected results.

Cell Enter in column A Expected A display Formula in column B Expected B display
A2 =1/0 #DIV/0! =ERROR.TYPE(A2) 2
A3 =NA() #N/A =ERROR.TYPE(A3) 7
A4 =SQRT(-1) #NUM! =ERROR.TYPE(A4) 6
A5 =10/2 5 =ERROR.TYPE(A5) #N/A
A6 Ready (plain text) Ready =ERROR.TYPE(A6) #N/A

Why: Division by zero produces the error in code 2. The documented NA function deliberately supplies a real #N/A, code 7. The official SQRT reference states that negative input produces #NUM!, code 6. The last two cells have no spreadsheet error; ERROR.TYPE itself therefore returns #N/A. No workbook engine was run to observe these displays.

Try a direct one-cell test too:

=ERROR.TYPE(1/0)

Expected 2, by the same documented mapping. This avoids ambiguous CSV import and cell type conversions when first testing an installation.

Advanced pattern: a readable diagnostic column that does not fill with #N/A

Instead of placing raw ERROR.TYPE codes in B2:B6, use a separate C column:

=IF(ISERROR(A2),ERROR.TYPE(A2),"OK")

Copy down to C6. Expected results: C2 2, C3 7, C4 6, C5 OK, C6 OK. The ONLYOFFICE ISERROR reference describes a TRUE/FALSE error test, while IF selects the result associated with the condition. This creates a useful audit without treating a valid price or text label as a failure.

Alternatively, for a report that needs text status rather than a distinction between a plain value and a formula error:

=IFERROR(ERROR.TYPE(A5),"No recognized error")

Expected No recognized error, because ERROR.TYPE(A5) itself returns #N/A. In contrast, =IFERROR(ERROR.TYPE(A3),"No recognized error") is expected to return 7, because the outer ERROR.TYPE calculation succeeded. This is a subtle but important distinction: a numeric code 7 means the input was #N/A; a visible #N/A as the ERROR.TYPE output can mean the input had no error. See ONLYOFFICE IFERROR.

Keep a copy of the original error-bearing cells during investigations. Replacing errors with zeroes for later SUM calculations can conceal missing data or incorrectly change business totals.

Source-checked error mapping and a second-order trap

The pinned ONLYOFFICE ERROR.TYPE routine contains the eight documented mappings and a fallback returning #N/A for a non-error or an unrecognized error category. It dereferences single cells before applying that map. An isolated source check confirmed all eight branches using synthetic error objects; it did not generate those errors in a running workbook. Code 8 remains unverified as an actual editor-produced #GETTING_DATA case.

A successful ERROR.TYPE call returns a number. That number does not itself retain the source error’s type. In particular, ERROR.TYPE(NA()) is expected to return 7, but applying ERROR.TYPE to that numeric 7 is expected to return #N/A. This explains why repeatedly classifying the diagnostic column is not the same as examining the original formula.

Advanced: keep source, diagnosis and presentation separate

Create DiagnosticLayers, with A1:E7 available. Enter the inputs below in A2:A6. Fill B2 =ERROR.TYPE(A2), C2 =ISERROR(A2), D2 =ISERROR(B2) and E2 =IF(C2,ERROR.TYPE(A2),0) through row 6.

Row A entry Expected B Expected C Expected D Expected E
2 =1/0 2 TRUE FALSE 2
3 =NA() 7 TRUE FALSE 7
4 5 #N/A FALSE TRUE 0
5 ="#N/A" #N/A FALSE TRUE 0
6 =SQRT(-1) 6 TRUE FALSE 6

C audits the source, while D audits the result of the diagnostic function. Their flags differ for every row in this fixture, which is intentional. The zero in E is an explicitly chosen reporting sentinel meaning no source error; it is not an ERROR.TYPE code and must not overwrite the actual source value.

On a copy, change A2 from =1/0 to =1/2. The source becomes 0.5; B2 becomes #N/A, C2 becomes FALSE, D2 becomes TRUE, and E2 becomes 0. Seeing a new error in B does not mean the repaired calculation failed. These composed formulas are independent worksheet expectations; no claim of native conditional evaluation is made.

Multi-cell array mapping is a separate code path. This guide’s fill-down exercise neither certifies array-entry syntax nor assumes each deployment returns a dynamic spill from a range argument.

Evidence date and scope: The fixed source revision above was retrieved and inspected on October 15, 2026. Cached Help Center references retain their stated October 13–14, 2026 checks. The isolated JavaScript tests use synthetic value/reference types; they do not execute a formula parser, complete calculation engine, workbook or graphical editor. No released-build mapping is inferred from the source commit.

Troubleshooting decision table

Symptom Likely cause What to check
ERROR.TYPE(A5) displays #N/A although A5 is 5 A5 is not an error. This is the function’s documented fallback. Use ISERROR(A5) if you only need TRUE/FALSE.
Input shows #N/A but its code isn’t 7 The entry may be text rather than a real #N/A error. Enter =NA() in a clean cell and test that reference.
Code is 6, not 2 #NUM! and division by zero are different errors. Inspect the upstream calculation; compare the explicit SQRT example.
Formula displays a parsing or name error Misspelled function name, locale or an unsupported edition. Use the Formula → Function dialog and the installed build’s help.
Another application shows a code not listed above Different engines can have additional error types. Check that application’s error table; do not import codes as though universally portable.
Someone used IFERROR(...,0) everywhere Data and formula problems may be disguised as true zeroes. Retain a separate diagnostic column before deciding whether to mask errors.

Locale and user-interface notes

The English function documentation uses ERROR.TYPE(error_val) and the examples above use the English names. The official Insert Functions guide demonstrates comma-separated arguments for multi-argument formulas, such as IF. A localized installation might use a different display name or argument separator; its exact mapping has not been checked here. Use the built-in Function Arguments window when a copied formula fails to parse.

ONLYOFFICE Docs online versus Desktop Editor and Excel

The ONLYOFFICE Formula tab guide shows separate online and Desktop interfaces, but the ERROR.TYPE function page provides no per-version introduction number or Desktop/web test matrix. Documentation presence must not be read as proof of execution on every installation. There has been no native execution in Docs web, Desktop Editors, mobile or imported XLSX files for these examples.

Microsoft’s Excel ERROR.TYPE reference documents the same standard 1–8 table, useful as a compatibility comparison. It is not proof of behaviour in ONLYOFFICE, and any newer Excel-specific error classes require separate verification.

Official sources and verification

Sources checked: 2026-10-13. The error mapping and example classifications were reviewed against official documentation and independent arithmetic/type reasoning. No native ONLYOFFICE execution was performed. Historical release support, localized entry and additional error classes remain untested.