Skip to content
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
9dbfe89
HF-131: document the SPILL error type
marcin-kordas-hoc Sep 8, 2026
1c1e80e
Merge remote-tracking branch 'pr6/tip' into docs/hf-131-types-of-errors
marcin-kordas-hoc Sep 11, 2026
5d90bec
Merge remote-tracking branch 'pr6/tip2' into docs/hf-131-types-of-errors
marcin-kordas-hoc Sep 11, 2026
5f54f7a
Merge branch 'fix/hf-131-issue-444-addresses' into docs/hf-131-types-…
marcin-kordas-hoc Sep 14, 2026
052b9a1
Merge branch 'fix/hf-131-issue-444-addresses' into docs/hf-131-types-…
marcin-kordas-hoc Sep 14, 2026
756cb08
HF-131: document how to find out where an error came from
marcin-kordas-hoc Sep 14, 2026
4eac6b3
Merge branch 'fix/hf-131-issue-444-addresses' into docs/hf-131-types-…
marcin-kordas-hoc Sep 14, 2026
fef6f10
Merge branch 'fix/hf-131-issue-444-addresses' into docs/hf-131-types-…
marcin-kordas-hoc Sep 14, 2026
a6d2df6
Merge branch 'fix/hf-131-issue-444-addresses' into docs/hf-131-types-…
marcin-kordas-hoc Sep 14, 2026
0ccc960
Merge branch 'fix/hf-131-issue-444-addresses' into docs/hf-131-types-…
marcin-kordas-hoc Sep 15, 2026
67cd26e
Merge branch 'fix/hf-131-issue-444-addresses' into docs/hf-131-types-…
marcin-kordas-hoc Sep 15, 2026
7d73eab
Merge fix/hf-131-issue-444-addresses into docs/hf-131-types-of-errors
marcin-kordas-hoc Oct 22, 2026
81acc1d
Merge fix/hf-131-issue-444-addresses into docs/hf-131-types-of-errors
marcin-kordas-hoc Oct 23, 2026
d236c93
HF-131: Make the error-origin example runnable as pasted, and list ar…
marcin-kordas-hoc Oct 23, 2026
46fd469
Merge fix/hf-131-issue-444-addresses into docs/hf-131-types-of-errors
marcin-kordas-hoc Oct 23, 2026
db631c0
Merge fix/hf-131-issue-444-addresses into docs/hf-131-types-of-errors
marcin-kordas-hoc Oct 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 41 additions & 2 deletions docs/guide/types-of-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tags:
- "#CYCLE!"
- "#ERROR!"
- "#LIC!"
- division by zero
- "#SPILL!"
Comment thread
cursor[bot] marked this conversation as resolved.
---

# Types of errors
Expand Down Expand Up @@ -37,4 +37,43 @@ according to the language settings.
| #VALUE! | Wrong type of argument | It occurs when a formula tries to improperly use different types of data. For example, you will see this error when you will try to add a string to a number. |
| #CYCLE! | Circular reference | It occurs when a formula refers to its own cell, both directly and indirectly. |
| #ERROR! | An error occurred | It indicates that there is an unknown error in a formula. |
| #LIC! | License key problem | It occurs when the license key is missing or invalid, when it has expired and your [license terms](license-key.md#license-key-notifications) stop it from working after that, or when the function is not included in the [feature package](license-key.md#feature-packages-and-add-ons) your license key grants. |
| #LIC! | License key problem | It occurs when the license key is missing or invalid, when it has expired and your [license terms](license-key.md#license-key-notifications) stop it from working after that, or when the function is not included in the [feature package](license-key.md#feature-packages-and-add-ons) your license key grants. |
| #SPILL! | No space for array result | It occurs when an array formula's result would overwrite one or more non-empty cells, so it has nowhere to spill into. |

## Error messages and explanations

An error's `message` property states the specific cause within its type — for
example, distinguishing *why* a formula returned `#NUM!` rather than only that it
did. HyperFormula does not turn that message into a longer, plain-language
explanation, and does not call out to a language model to generate one. An
application built on top of HyperFormula that wants to rephrase an error for its
end users — in natural language, or translated beyond the languages HyperFormula
ships with — should do so at the application layer, using the `type` and
`message` HyperFormula already provides as its input.

## Finding out where an error came from

Besides `type` and `message`, a `DetailedCellError` tells you what produced the
error and, when it was a function rejecting one of its own arguments, which
argument. `originFunction` names a function or an operator helper when one of them
rejected a value, and otherwise names what built the error: `reference` for a
reference that cannot be resolved, `removed reference` for one destroyed by
removing rows or columns, `parser` for a formula that could not be parsed, `user
input` for an error value typed into a cell, `literal` for one written into a
formula, or `array literal` for an array literal whose rows differ in length.
`argumentIndex` is zero-based.

```javascript
const hf = HyperFormula.buildFromArray(
[['=SUM(SQRT(-1))'], ['=DATE(2000, "x", 1)'], ['=SUM(A99999999999:A99999999999)']],
{ licenseKey: 'gpl-v3' }
);

hf.getCellValue({ sheet: 0, row: 0, col: 0 }).originFunction; // 'SQRT', not 'SUM'
hf.getCellValue({ sheet: 0, row: 1, col: 0 }).argumentIndex; // 1, the second argument
hf.getCellValue({ sheet: 0, row: 2, col: 0 }).originFunction; // 'reference'
```

The first occurrence wins, so a function that only read an error never replaces
the identity already on it. `address` points at the cell where the error arose,
which is not always the cell you read it from.
Loading