From a96202accfbe0c69591117dadf3625a21494abad Mon Sep 17 00:00:00 2001 From: Kuba Sekowski Date: Thu, 16 Jan 2025 20:32:50 +0100 Subject: [PATCH 1/2] Describe the limitation of the OFFSET function in the runtime differences guide --- docs/guide/list-of-differences.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/guide/list-of-differences.md b/docs/guide/list-of-differences.md index e470034dc..77be765e9 100644 --- a/docs/guide/list-of-differences.md +++ b/docs/guide/list-of-differences.md @@ -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)

ISREF(A1) | Dependencies are collected during the parsing phase, which finds cycles that wouldn't appear in the evaluation.

`CYCLE` error for both examples. | Dependencies are collected during evaluation.

`0` for both examples. | Same as Google Sheets. | | Named expressions and named ranges | SALARY:=$A$10 COST:=10*$B$5+100
PROFIT:=SALARY-COST
A1:=SALARY-COST | Only absolute addresses are allowed
(e.g., SALARY:= $A$10).

Named expressions can be global or scoped to one sheet only.

They can contain other named expressions. | Named expressions are not available.

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. | @@ -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 @@ -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 | @@ -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 | \ No newline at end of file +| ADDRESS | =ADDRESS(1,1,4, TRUE(), "") | !A1 | ''!A1 | !A1 | From 25eeab0c0cd9ca03e72f218d417f1b89f6c7a23b Mon Sep 17 00:00:00 2001 From: Kuba Sekowski Date: Thu, 16 Jan 2025 20:37:19 +0100 Subject: [PATCH 2/2] Improve formatting --- docs/guide/list-of-differences.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/list-of-differences.md b/docs/guide/list-of-differences.md index 77be765e9..0c6828e5a 100644 --- a/docs/guide/list-of-differences.md +++ b/docs/guide/list-of-differences.md @@ -35,7 +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. | +| OFFSET function | =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