Skip to content

Commit

Permalink
Describe the limitation of the OFFSET function in the runtime differe…
Browse files Browse the repository at this point in the history
…nces guide
  • Loading branch information
sequba committed Jan 16, 2025
1 parent f392eae commit a96202a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/guide/list-of-differences.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ See a full list of differences between HyperFormula, Microsoft Excel, and Google
## General functionalities

| Functionality | Examples | HyperFormula | Google Sheets | Microsoft Excel |
| -------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
|----------------------------------------------------|---------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|
| Dependency collection | A1:=IF(FALSE(), A1, 0)<br><br>ISREF(A1) | Dependencies are collected during the parsing phase, which finds cycles that wouldn't appear in the evaluation.<br><br>`CYCLE` error for both examples. | Dependencies are collected during evaluation.<br><br>`0` for both examples. | Same as Google Sheets. |
| Named expressions and named ranges | SALARY:=$A$10 COST:=10*$B$5+100<br>PROFIT:=SALARY-COST<br>A1:=SALARY-COST | Only absolute addresses are allowed<br>(e.g., SALARY:= $A$10).<br><br>Named expressions can be global or scoped to one sheet only.<br><br>They can contain other named expressions. | Named expressions are not available.<br><br>Named ranges can be used to create aliases for addresses and ranges. | Named ranges and scoped named expressions are available. |
| Named expression names | ProductPrice1:=42 | A name must be distinctive from a cell reference (case-insensitive), so `ProductPrice1` is invalid. See [complete naming rules](named-expressions.md#name-rules). | A name that is a valid cell reference is allowed if the column address is at least 4-letter long, so `ProductPrice1` is valid. | A name that is a valid cell reference is allowed if the column address is at least 4-letter long, so `ProductPrice1` is valid. |
Expand All @@ -35,6 +35,7 @@ See a full list of differences between HyperFormula, Microsoft Excel, and Google
| TIMEVALUE function | =TIMEVALUE("14:31") | Type of the returned value: `CellValueDetailedType.NUMBER_TIME` (compliant with the [OpenDocument](https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part4-formula/OpenDocument-v1.3-os-part4-formula.html) standard) | Cell auto-formatted as **regular number** | Cell auto-formatted as **regular number** |
| EDATE function | =EDATE(DATE(2019, 7, 31), 1) | Type of the returned value: `CellValueDetailedType.NUMBER_DATE`. This is non-compliant with the [OpenDocument](https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part4-formula/OpenDocument-v1.3-os-part4-formula.html) standard, which defines the return type as a Number, while describing it as a Date serial number through the function summary. | Cell auto-formatted as **date** | Cell auto-formatted as **regular number** |
| EOMONTH function | =EOMONTH(DATE(2019, 7, 31), 1) | Type of the returned value: `CellValueDetailedType.NUMBER_DATE`. This is non-compliant with the [OpenDocument](https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part4-formula/OpenDocument-v1.3-os-part4-formula.html) standard, which defines the return type as a Number, while describing it as a Date serial number through the function summary. | Cell auto-formatted as **date** | Cell auto-formatted as **regular number** |
| OFFSET | =OFFSET(A1:B1, 0, 0) | First parameter must be a reference to a single cell. | First parameter may be a single cell or a range. | First parameter may be a single cell or a range. |

## Built-in functions

Expand All @@ -43,7 +44,7 @@ Some built-in functions are implemented differently than in Google Sheets or Mic
To remove the differences, create [custom implementations](custom-functions.md) of those functions.

| Function | Example | HyperFormula | Google Sheets | Microsoft Excel |
| ------------- | -------------------------------------------------------------- | -----------: | ------------: | --------------: |
|---------------|----------------------------------------------------------------|-------------:|--------------:|----------------:|
| TBILLEQ | =TBILLEQ(0, 180, 1.9) | 38.5278 | NUM | NUM |
| TBILLEQ | =TBILLEQ(0, 180, 2) | 0.0000 | NUM | 0.0000 |
| TBILLEQ | =TBILLEQ("1/2/2000", "31/1/2001", 0.1) | 0.1128 | VALUE | VALUE |
Expand Down Expand Up @@ -97,4 +98,4 @@ To remove the differences, create [custom implementations](custom-functions.md)
| BINOM.INV | =BINOM.INV(10, 1, 0.5) | 10.0000 | NUM | NUM |
| DEVSQ | =DEVSQ(A2, A3) | 0.0000 | 0.0000 | NUM |
| NORMSDIST | =NORMSDIST(0, TRUE()) | 0.5 | Wrong number | Wrong number |
| ADDRESS | =ADDRESS(1,1,4, TRUE(), "") | !A1 | ''!A1 | !A1 |
| ADDRESS | =ADDRESS(1,1,4, TRUE(), "") | !A1 | ''!A1 | !A1 |

0 comments on commit a96202a

Please # to comment.