ERRORTYPE in Calligra Sheets: Identify Spreadsheet Error Codes
Look up Calligra ERRORTYPE codes for spreadsheet errors, including nonstandard internal errors and the difference from Excel.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in Calligra Sheets. How formula examples are checked
Version scope, October 12, 2026. This guide checks the KDE ERRORTYPE entry, KDE’s 26.08.2 XML contract and the registered 26.08.2 func_errortype callback. Calligra 26.08.2 was announced October 8, 2026. The source lists classic error codes and three product-specific codes. A Calligra application was not run, so this tutorial carefully distinguishes official example text, source-level return branches and expected worksheet results. Source registration/implementation is not native runtime verification. Error presentation, function names and separators can vary by locale; this one-argument function itself needs no locale-dependent argument separator.
Quick answer: =ERRORTYPE(NA()) returns 7 in the official KDE documentation, meaning N/A. Use ERRORTYPE(error) to classify an error value by a numeric code. Do not confuse the return code with the original error itself, and do not silently substitute Microsoft’s different function spelling ERROR.TYPE when migrating formulas.
What ERRORTYPE does (and does not do)
An error code can make troubleshooting more systematic: division by zero, missing references, invalid numbers and unavailable values represent different failures. ERRORTYPE is not the same as ISERROR: ISERROR asks for TRUE/FALSE, while ERRORTYPE attempts to return a numeric classification. The 26.08.2 callback checks whether the input is an error first, and then compares known error categories. The C++ also explicitly handles several Calligra-specific internal errors, but those exceptional cases do not prove that each is readily producible from a normal sheet formula.
Exact official syntax and argument contract
=ERRORTYPE(value)
| Position | Name | Official KDE XML type | Required | Default |
|---|---|---|---|---|
| 1 | value |
Any (the callback expects an error value) |
Yes | None |
KDE’s XML declares result type Int. The callback returns a Value::errorVALUE() when the input is not an error—it does not return a numeric 0 for ordinary inputs. This is an important source-level distinction from Excel’s treatment of non-errors. KDE’s handbook only says ERRORTYPE(0) returns an error; the error category is inferred here from source, not natively observed. Official XML.
The error code table from the 26.08.2 implementation
| Calligra source error value | Return code | Status and explanation |
|---|---|---|
Null intersection (errorNULL) |
1 | Registered callback branch; worksheet production untested |
Division by zero (errorDIV0) |
2 | Registered callback branch; worksheet production untested |
Invalid value (errorVALUE) |
3 | Registered callback branch; worksheet production untested |
Invalid reference (errorREF) |
4 | Registered callback branch; worksheet production untested |
Unknown function/name (errorNAME) |
5 | Registered callback branch; worksheet production untested |
Invalid numeric value (errorNUM) |
6 | Registered callback branch; worksheet production untested |
N/A (errorNA) |
7 | KDE-documented ERRORTYPE(NA()) returns 7; source branch agrees |
Circular-dependency marker (errorCIRCLE) |
101 | Calligra-specific source branch; native reachability unverified |
Dependency marker (errorDEPEND) |
102 | Calligra-specific source branch; native reachability unverified |
Formula-parse marker (errorPARSE) |
103 | Calligra-specific source branch; native reachability unverified |
The callback has a final integer 0 fallback for an unrecognized internal error type. That is not a documented result for valid worksheet input and is not a replacement for the non-error case. The table describes code paths in KDE’s C++ source, rather than ten natively demonstrated worksheet recipes.
Reproducible formula checks and expected outputs
Enter the following formulas in separate empty cells in a new sheet. To avoid confusion, distinguish a source statement of expected results from an actual test in the app.
| Formula | Expected result | Basis | Native limitation |
|---|---|---|---|
=ERRORTYPE(NA()) |
7 |
Explicit KDE example + source callback | No application execution performed |
=ERRORTYPE(0) |
An error; C++ predicts value error | KDE documents “an error”; source specifies errorVALUE |
No native error display captured |
=ERRORTYPE(1/0) |
2 if the division error is passed into the callback |
Source-inferred | Evaluator may intercept error arguments; verify |
=ERRORTYPE("N/A") |
Value error for ordinary text | Source-inferred | Text is not the N/A error value |
=ISERROR(NA()) |
TRUE if error reaches ISERROR | Source-inferred | Surrounding evaluator routing unverified |
Do not enter #N/A as text and assume it is the same as =NA(). Quotation marks produce text. The NA() function returns a typed error value (KDE). The 1/0 example deliberately contains a calculation error and should be used only in a disposable test sheet.
Advanced case 1: classify a failing import calculation
Place a formula that might fail in B2. Then in C2 enter:
=IF(ISERROR(B2);ERRORTYPE(B2);0)
The intent is to show an error code when B2 truly contains an error, and a harmless placeholder 0 otherwise. The combined logic relies on error passing through ISERROR, IF and ERRORTYPE. In this research, its result was not observed in native Calligra. Do not confuse this formula’s intentional 0 on the non-error IF branch with ERRORTYPE’s own non-error return, which is source-level errorVALUE.
Advanced case 2: use N/A testing when you only care about missing data
If you only want to detect missing values, =ISNA(B2) is conceptually simpler than checking =ERRORTYPE(B2)=7. The comparison formula may itself error when B2 is not an error. KDE’s ISNA definition specifically identifies N/A, and its ISERR excludes N/A. Choose a Boolean information function for a Boolean question.
Advanced case 3: diagnose errors in different categories
Suppose an import produces a division-by-zero error in one row and an explicit NA() in another. ERRORTYPE has callback branches for 2 and 7, allowing downstream labels if error arguments are delivered to the function. Do not build production conditional logic around the undocumented 101–103 codes without verifying which source-level internal error states the target build can actually generate and pass into ERRORTYPE.
Troubleshooting, limitations and common mistakes
- I entered a normal number and got an error. That is expected at the C++ callback:
ERRORTYPErequires an error value. KDE explicitly saysERRORTYPE(0)returns an error. Source. - I expected
#N/Abut got a value error for a non-error argument. Excel’sERROR.TYPEdocuments#N/Afor an input with no error; the examined CalligraERRORTYPEpath explicitly returnserrorVALUE. Treat the difference as source-level until natively confirmed. - An error formula was not turned into a number. Spreadsheet formula evaluation might propagate an error before invoking this callback. The existence of a source branch does not establish its reachability in every context.
- I see code 101, 102 or 103 mentioned online. These are explicit Calligra-specific source branches for circular/dependency/parse markers, not ordinary Excel codes and not yet independently reproduced in a worksheet.
- Text
"#N/A"returned the wrong class. It is a string, not a true N/A error; use=NA()for a typed missing-value error. - My function name is rejected in another spreadsheet. Excel uses
ERROR.TYPE, while KDE registersERRORTYPE. Formula spelling and error-code extensions are vendor-specific; test imports. - Boolean error detectors disagree. ISERROR counts N/A; ISERR excludes N/A; ISNA targets it specifically. Use the test that matches your task.
Cross-compatibility: Excel and LibreOffice Calc
The Microsoft Excel ERROR.TYPE documentation defines codes 1–7 for classic errors, and code 8 for #GETTING_DATA, plus an #N/A return for non-errors. The examined Calligra ERRORTYPE callback supports the 1–7 codes and its own 101–103 markers, does not define Excel’s code 8, and follows the errorVALUE path for non-errors. Excel’s function name contains a period; Calligra’s registered canonical spelling does not. LibreOffice’s Calc information-function documentation documents its own information/error functions: verify the precise ERROR.TYPE/ERRORTYPE naming and code scheme in the destination version instead of assuming equal behavior from similar names. For migration, test simple NA() and division-error cases on both products, with actual application execution when possible.
Official references and related learning
Checked October 12, 2026: KDE ERRORTYPE entry, KDE NA entry, 26.08.2 XML contract, registered C++ error-code branches, KDE release announcement, Microsoft ERROR.TYPE reference and LibreOffice Calc information documentation. Related official ISERROR, ISERR and ISNA documentation is available for less intrusive Boolean tests.