Skip to content

Add TOROW and TOCOL functions (HF-388, HF-387) - #1828

Open
Tobiadefami wants to merge 71 commits into
developfrom
feature/HF-387
Open

Tobiadefami wants to merge 71 commits into
developfrom
feature/HF-387

Conversation

@Tobiadefami

@Tobiadefami Tobiadefami commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Context

Adds TOROW and TOCOL, which flatten an array into one row or one column.

  • ignore: 0 keeps everything, 1 skips blanks, 2 skips errors, 3 skips both. Empty text is not blank.
  • scan_by_column accepts numbers, booleans and the text "TRUE"/"FALSE"; other text returns #VALUE!.
  • Everything skipped returns #CALC!.

Both functions share one implementation in ArrayPlugin. HyperFormula sizes an array result before evaluating it, so with ignore 1-3 the source's size is reserved and the unused cells stay blank, as for FILTER.

Whole columns use the source sheet's used height, as in TAKE and DROP. To stop a formula from making its own sheet taller each time it is entered, a whole column spills from row 1 only when it is on the formula's own sheet, computed (DROP(A:A, 1)), or may keep blanks. TOROW over a whole column returns #SPILL! in the same cases. Rows mirror this.

I tried looking through DROP, TAKE, IF, CHOOSE and IFS to size computed whole columns, and dropped it: it only covered those five functions, and the real limitation (sizing before evaluation) belongs to the engine.

How did you test your changes?

  • Tests branch feature/HF-387 (handsontable/hyperformula-tests#96): 159 TOROW and 152 TOCOL tests, generated from cases measured in Microsoft Excel Online.
  • npm run test:jest: 15,193 passed, 0 failed.
  • Returning #N/A instead of #CALC! fails 10 tests; removing the own-sheet rule fails 2.

AI assistance

Claude Code wrote the implementation, docs and tests, and ran the Excel and Google Sheets checks. I reviewed all of it.

Compatibility with Excel and Google Sheets

Everything matches Excel except these, all listed in list-of-differences.md:

Formula Excel Google Sheets HyperFormula
=TOCOL(A1:A5, 1), A1:A5 = 1, (empty), 3, (empty), 5 1, 3, 5 1, 3, 5 1, 3, 5, then two blank cells
=TOROW(A1:C3, 0, {0,1}), A1:C3 = 1 to 9 1, 1 1 to 9 1 to 9
=TOCOL(A1, 2), A1 = =1/0 #CALC! #REF! #DIV/0!
=TOCOL(A:A, 1) in D5, A1:A3 = 1, 2, 3 1, 2, 3 1, 2, 3 #SPILL!
=TOCOL(DROP(A:A, 1), 1) in F5, A1 = 1, A3 = 3 3 #NAME? #SPILL!
=TOROW(A:A, 1) in B8, A1:A3 = 1, 4, 7 1, 4, 7 1, 4, 7 #SPILL!
=COLUMNS(TOROW(Data!A:A)) 1048576 1000 the sheet's used height
=TOCOL(Data!A:B) #NUM! 2000 cells #SPILL!

Public API changes

None.

Out of scope and follow-ups

  • Sizing array results after evaluation, which computed whole columns and very large sources with blanks skipped would need. Engine-wide; documented in known-limitations.md.
  • An array in ignore or scan_by_column uses its first value; Excel returns one result per element.

Types of changes

  • Breaking change (existing functionality no longer works as before) – agreed with the maintainers
  • New feature or improvement (a non-breaking change that adds functionality)
  • Bug fix (a non-breaking change that fixes an issue)
  • Additional language file, or a change to an existing language file (translations)
  • Change to the documentation

Related issues

  1. HF-388, HF-387

Checklist

🤖 Generated with Claude Code


Note

Medium Risk
Large changes to core dynamic-array spill prediction and evaluation in ArrayPlugin; behavior differs from Excel in several edge cases but is heavily documented and tested.

Overview
Adds four Excel-style dynamic-array helpers—TAKE, DROP, TOROW, and TOCOL—in ArrayPlugin, with shared slicing/flattening logic, static spill-size prediction, and #SPILL! rules for whole-row/column sources.

TAKE and DROP trim rows/columns from the start or end of a range (zero counts → #N/A; new ZeroRowOrColumnCount message). TOROW / TOCOL flatten a range into one row or column with ignore and scan_by_column, matching Excel coercion and error ordering where documented.

Spill sizing resolves literal counts (and simple arithmetic on literals) before evaluation; dynamic counts reserve the full source bounds, which differs from Excel for cases like DROP(..., cellRef). Whole-column/whole-row sources use effective sheet dimensions and only spill from row 1 / column A on the formula sheet to avoid runaway sheet growth.

Also adds Interpreter.isFunctionImplementedBy for literal-count parsing, function metadata, localized names across language packs, changelog entries, and docs (known-limitations, Excel comparison rows for array errors and these functions).

Reviewed by Cursor Bugbot for commit 89ce2a7. Bugbot is set up for automated code reviews on this repo. Configure here.

Tobiadefami and others added 30 commits August 13, 2026 11:28
TAKE shipped with the English name in 10 of 16 packs while 6 carried a
translation, and VSTACK/HSTACK were English in all 16. Microsoft localizes
all three in most locales, so a user could not type the name their Excel
uses.

Names taken from Microsoft's localized "Excel functions (alphabetical)"
page, one locale at a time. Each row there links to the function's own page
using the English slug in the href while the link text is the localized
name, so the lookup is exact:

    <a href="functions/take-function">WYCINEK</a>

Left as English where Microsoft itself does not translate: TAKE, VSTACK and
HSTACK in Indonesian, and VSTACK/HSTACK in Swedish.

Note that a function's own localized page is not a usable source: for
several locales its syntax block still shows the English name even though
the prose and argument names are translated (the French page shows
"=TAKE(tableau, lignes,[colonnes])" while the product uses PRENDRE).

DEV_DOCS records the lookup method and adds the governing policy: ship a
localized name only when it can be confirmed against the product, and keep
the English name otherwise, since an invented name matches nothing, reads
plausibly enough to be typed first, and fails as #NAME?.

No changelog entry: TAKE, VSTACK and HSTACK are all still in [Unreleased],
so no wrong name has been released.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Tobiadefami and others added 11 commits November 11, 2026 14:29
Below the first row, TAKE returned #SPILL! for any count read from a cell
when the whole-column or whole-row source was on the formula's own sheet,
because a larger result used to throw. A result taller or wider than its
reserved area now returns #SPILL! on its own, so the guard is no longer
needed: counts that fit spill, as in Excel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ure/hf-384-drop

# Conflicts:
#	hyperformula/src/interpreter/plugin/ArrayPlugin.ts
An empty rows argument still keeps every row, as in Microsoft Excel; it is now
detected in the method instead of through a default value, which made
getFunctionDetails report the argument as optional.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	CHANGELOG.md
#	docs/guide/list-of-differences.md
#	hyperformula/src/interpreter/plugin/ArrayPlugin.ts
#	hyperformula/src/license/functionCapabilities.ts
…feature/hf-384-drop

# Conflicts:
#	hyperformula/src/interpreter/plugin/ArrayPlugin.ts
#	hyperformula/src/license/functionCapabilities.ts
develop's tree equals df4c98d (the TAKE head squash-merged as #1722), which this branch already merged.
…to feature/HF-387

# Conflicts:
#	docs/guide/known-limitations.md
#	hyperformula/src/interpreter/plugin/ArrayPlugin.ts
#	hyperformula/src/license/functionCapabilities.ts
Tobiadefami added a commit that referenced this pull request Nov 19, 2026
### Context

Microsoft Excel returns `#CALC!` when a function cannot calculate its
result, most often when the result would be an empty array. HyperFormula
had no such error and returned `#N/A` or `#VALUE!` in those cases. This
adds `ErrorType.CALC` and switches the functions where Excel returns it:

| Function | Case | Before | After |
|---|---|---|---|
| `FILTER` | No value meets the conditions | `#N/A` | `#CALC!` |
| `UNIQUE` | Nothing is kept (`exactly_once` is `TRUE` and every row or
column repeats) | `#N/A` | `#CALC!` |
| `SEQUENCE` | Rows or columns truncate to 0 (`0`, `0.5`, `FALSE()`, a
blank cell) | `#VALUE!` | `#CALC!` |
| `CONCAT`, `TEXTJOIN` | The result is longer than 32,767 characters |
`#VALUE!` | `#CALC!` |

This is a breaking change, so it targets 4.0.0:

- `TranslationPackage` validates error keys exhaustively, so a custom
language pack without `errors.CALC` makes `registerLanguage()` throw a
`MissingTranslationError`.
- `IFNA()` and `ISNA()` no longer catch the errors listed above.

`ERROR.TYPE` returns `14` for `#CALC!`, the number Excel uses.

Each built-in language pack gets the name Excel uses in that language,
for example `#OBL!` (Polish), `#HESAPLA!` (Turkish), `#KALK!` (Swedish);
German, French, Dutch and several others keep `#CALC!`. The names were
checked in Microsoft Excel Online set to each language. Microsoft's
localized "How to correct a #CALC! error" pages are not reliable for
this (the Finnish, Portuguese and Russian pages say `#CALC!` where Excel
shows `#LASKE!`, `#CÁLC!` and `#ВЫЧИСЛ!`, and the Danish and Dutch pages
give names Excel doesn't use), so `dev-docs/I18N.md` now says to confirm
every error name in Excel.

The `hyperformula-ui` formula lexer now recognises `#CALC!`, so the
editor no longer marks it as invalid.

`SORT` keeps `#N/A` for an empty input. Excel never returns `#CALC!`
there: `SORT` of an empty column returns blank rows. HyperFormula's
branch only guards a zero-width sheet.

`SEQUENCE` now checks for a row count above `maxRows` before checking
for a dimension of 0, and for a column count above `maxColumns` after
it. This is the order Excel follows: `=SEQUENCE(2000000,0)` is
`#VALUE!`, `=SEQUENCE(0,20000)` is `#CALC!`.

### How did you test your changes?

- `npx jest` in `hyperformula/` with the paired `hyperformula-tests`
branch `feat/hf-134-calc-error` (handsontable/hyperformula-tests#118):
539 suites, 8,379 tests passed.
- `npx tsc --noEmit`, and `eslint` on the changed files: no errors.
- `npm run docs:build`: passes, including the new migration guide.

### AI assistance

Claude Code wrote parts of the code, tests and docs, and ran the Excel
comparison.

### Compatibility with Excel and Google Sheets

Checked in Microsoft Excel Online:

| Formula | Excel | Google Sheets | HyperFormula |
|---|---|---|---|
| `=FILTER({1;2;3},{1;2;3}>5)` | `#CALC!` | Not checked | `#CALC!` |
| `=UNIQUE({1;1;2;2},,TRUE())` | `#CALC!` | Not checked | `#CALC!` |
| `=SEQUENCE(0)`, `=SEQUENCE(0.5)`, `=SEQUENCE(1,0)` | `#CALC!` | Not
checked | `#CALC!` |
| `=SEQUENCE(-1)`, `=SEQUENCE(0,-1)` | `#VALUE!` | Not checked |
`#VALUE!` |
| `=SEQUENCE(2000000,0)` | `#VALUE!` | Not checked | `#VALUE!` |
| `=CONCAT(REPT("a",32767),"b")` | `#CALC!` | Not checked | `#CALC!` |
| `=TEXTJOIN("",FALSE(),REPT("a",32767),"b")` | `#CALC!` | Not checked |
`#CALC!` |
| `=IFNA(FILTER({1},{0}),"x")` | `#CALC!` | Not checked | `#CALC!` |
| `=ISERR(FILTER({1},{0}))` | `TRUE` | Not checked | `TRUE` |
| `=ERROR.TYPE(FILTER({1},{0}))` | `14` | Not checked | `14` |
| `=SORT(A:A)` on an empty column | blank rows | Not checked | blank |

Added to `list-of-differences.md`: empty text used as a number (`=""+1`,
`=ABS("")`, `=SEQUENCE("")`) is `#VALUE!` in Excel. HyperFormula reads
it as `0`, so `=SEQUENCE("")` now returns `#CALC!`.

### Public API changes

- `ErrorType.CALC` added.
- `RawTranslationPackage.errors` must include `CALC`.

### Out of scope and follow-ups

- `TAKE` (#1722), `DROP` (#1796), `TOROW`/`TOCOL` (#1828), and
`WRAPROWS`/`WRAPCOLS`/`EXPAND` (#1830) return `#N/A` for an empty result
while they wait for this error type. Whichever of those PRs and this one
merges second switches them to `#CALC!`.

### Types of changes
- [x] Breaking change (existing functionality no longer works as before)
– agreed with the maintainers
- [ ] New feature or improvement (a non-breaking change that adds
functionality)
- [ ] Bug fix (a non-breaking change that fixes an issue)
- [x] Additional language file, or a change to an existing language file
(translations)
- [x] Change to the documentation

### Related issues
1. Fixes #1647 (HF-134)

### Checklist
- [x] My pull request meets the [Definition of
Done](https://github.com/handsontable/hyperformula/blob/develop/dev-docs/DEFINITION-OF-DONE.md).
External contributors: see also [Contributing to
HyperFormula](https://handsontable.com/docs/hyperformula/guide/contributing.html).
- [ ] I have signed the [Contributor License
Agreement](https://goo.gl/forms/yuutGuN0RjsikVpM2).
- [x] I read my own diff end to end before requesting a review.
- [x] I added a
[CHANGELOG.md](https://github.com/handsontable/hyperformula/blob/develop/CHANGELOG.md)
entry, written by [the changelog
rules](https://github.com/handsontable/hyperformula/blob/develop/dev-docs/DOC-STANDARDS.md#the-changelog)
– or none is needed (docs, tests or tooling only).
- [x] I updated the documentation and JSDoc to match the change.
- [x] Breaking change only: I added a section to the migration guide.
- [x] I updated the `dev-docs/` pages this change affects – or none
needed it.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **High Risk**
> Breaking error semantics across array and text functions and mandatory
i18n keys will change formula results and can break custom language
packs and error-handling logic on upgrade.
> 
> **Overview**
> Adds **`ErrorType.CALC`** (`#CALC!`) as a breaking 4.0 change so
HyperFormula matches Excel when a function cannot produce a
result—especially empty arrays or oversized text.
> 
> **`FILTER`**, **`UNIQUE`** (empty result), **`SEQUENCE`** (truncated
row/column count of 0), and **`CONCAT`** / **`TEXTJOIN`** (over 32,767
characters) now return **`#CALC!`** instead of **`#N/A`** or
**`#VALUE!`**. **`IFNA()`** and **`ISNA()`** no longer handle these
cases; callers need **`IFERROR()`** / **`ISERROR()`** or explicit
**`ErrorType.CALC`** checks. **`SEQUENCE`** also reorders validation so
oversized row counts are checked before zero-dimension **`#CALC!`**,
like Excel.
> 
> All built-in language packs gain localized **`errors.CALC`** strings;
**`registerLanguage()`** throws **`MissingTranslationError`** if a
custom pack omits **`CALC`**. Docs include a **3.x → 4.0** migration
guide, updated error/compatibility pages, and changelog entry.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
3166a31. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Tobiadefami and others added 2 commits November 20, 2026 14:29
# Conflicts:
#	CHANGELOG.md
#	docs/guide/known-limitations.md
#	docs/guide/list-of-differences.md
#	hyperformula/src/i18n/languages/csCZ.ts
#	hyperformula/src/i18n/languages/daDK.ts
#	hyperformula/src/i18n/languages/deDE.ts
#	hyperformula/src/i18n/languages/enGB.ts
#	hyperformula/src/i18n/languages/esES.ts
#	hyperformula/src/i18n/languages/fiFI.ts
#	hyperformula/src/i18n/languages/frFR.ts
#	hyperformula/src/i18n/languages/huHU.ts
#	hyperformula/src/i18n/languages/idID.ts
#	hyperformula/src/i18n/languages/itIT.ts
#	hyperformula/src/i18n/languages/nbNO.ts
#	hyperformula/src/i18n/languages/nlNL.ts
#	hyperformula/src/i18n/languages/plPL.ts
#	hyperformula/src/i18n/languages/ptPT.ts
#	hyperformula/src/i18n/languages/ruRU.ts
#	hyperformula/src/i18n/languages/svSE.ts
#	hyperformula/src/i18n/languages/trTR.ts
#	hyperformula/src/interpreter/functionMetadata/categories/lookup-and-reference.ts
#	hyperformula/src/interpreter/plugin/ArrayPlugin.ts
#	hyperformula/src/license/functionCapabilities.ts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tobiadefami added a commit that referenced this pull request Nov 20, 2026
…34) (#1906)

### Context
#1889 added the `#CALC!` error and switched FILTER, UNIQUE, SEQUENCE,
CONCAT and TEXTJOIN to it, as Excel does. TAKE and DROP reached develop
after that PR was cut, and still returned `#N/A` where Excel returns
`#CALC!`:

- TAKE with a row or column count that truncates to 0 (`0`, `-0`, `0.5`,
`FALSE()`, or both counts 0)
- DROP that drops every row or every column (including counts larger
than the source)

Both now return `#CALC!`, and the two `list-of-differences.md` rows for
this gap are removed. Neither function has been released yet, so no
changelog entry is needed.

Every other array function on develop was checked against Excel for the
same family of cases (zero counts, empty results, nested arrays, an
empty array passed through VSTACK, SORT, INDEX, ROWS and others): they
already return Excel's error.

### How did you test your changes?
- `npx jest` in `hyperformula/` with the paired branch
`fix/hf-134-calc-sweep` (handsontable/hyperformula-tests#125): 14,882
passed, 3 skipped.
- The 19 updated TAKE and DROP specs fail on develop and pass here.
- `npm run lint` and `npm run verify:typings` pass.

### AI assistance
Claude Code made the change, updated the specs and measured the cases in
Excel.

### Compatibility with Excel and Google Sheets
| Formula | Excel | Google Sheets | HyperFormula |
|---|---|---|---|
| `=TAKE(A1:C3, 0)`, `=TAKE(A1:C3, , 0)`, `=TAKE(A1:C3, 0, 0)` |
`#CALC!` | No such function | `#CALC!` (was `#N/A`) |
| `=TAKE(A1:C3, -0)`, `=TAKE(A1:C3, 0.5)` | `#CALC!` | No such function
| `#CALC!` (was `#N/A`) |
| `=DROP(A1:C3, 3)`, `=DROP(A1:C3, -3)`, `=DROP(A1:C3, 5)` | `#CALC!` |
No such function | `#CALC!` (was `#N/A`) |
| `=DROP(A1:C3, , 3)`, `=DROP(A1:C3, 3, 3)` | `#CALC!` | No such
function | `#CALC!` (was `#N/A`) |

### Public API changes
None.

### Out of scope and follow-ups
- TOROW and TOCOL switch to `#CALC!` in their own PR (#1828).

### Types of changes
- [ ] Breaking change (existing functionality no longer works as before)
– agreed with the maintainers
- [ ] New feature or improvement (a non-breaking change that adds
functionality)
- [x] Bug fix (a non-breaking change that fixes an issue)
- [ ] Additional language file, or a change to an existing language file
(translations)
- [x] Change to the documentation

### Related issues
1. HF-134 (follow-up to #1889)
2. Tests: handsontable/hyperformula-tests#125

### Checklist
- [x] My pull request meets the [Definition of
Done](https://github.com/handsontable/hyperformula/blob/develop/dev-docs/DEFINITION-OF-DONE.md).
External contributors: see also [Contributing to
HyperFormula](https://handsontable.com/docs/hyperformula/guide/contributing.html).
- [ ] I have signed the [Contributor License
Agreement](https://goo.gl/forms/yuutGuN0RjsikVpM2).
- [x] I read my own diff end to end before requesting a review.
- [x] I added a
[CHANGELOG.md](https://github.com/handsontable/hyperformula/blob/develop/CHANGELOG.md)
entry, written by [the changelog
rules](https://github.com/handsontable/hyperformula/blob/develop/dev-docs/DOC-STANDARDS.md#the-changelog)
– or none is needed (docs, tests or tooling only).
- [x] I updated the documentation and JSDoc to match the change.
- [ ] Breaking change only: I added a section to the migration guide.
- [x] I updated the `dev-docs/` pages this change affects – or none
needed it.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Tobiadefami and others added 4 commits November 22, 2026 20:25
A result with every element ignored returns #CALC!, as in Microsoft Excel Online. The ignore argument uses the count
helper of WRAPROWS, WRAPCOLS and EXPAND. The list of differences now has measured Excel results for the whole-column
rows, and drops the empty-result rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ze an invalid scan_by_column as an error

A whole column flattened by TOROW returns #SPILL! when blank cells may be kept, as in Microsoft Excel Online, and
also when it is on the formula's own sheet or computed, so that TOROW and TOCOL formulas on one sheet cannot make it
grow. Text other than TRUE or FALSE, or an error, in scan_by_column returns its error without reserving the result's
cells. The list of differences gets the Google Sheets results of the TOROW and TOCOL rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, and document the source-size limit

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Tobiadefami
Tobiadefami marked this pull request as ready for review November 22, 2026 20:43

@handsontable-pr-review handsontable-pr-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Medium risk: Adds new TOROW/TOCOL functions to the formula engine plus i18n entries and docs; the impact is limited to the new functions' behavior (spill reservation, whole-column/row handling), with no changes to existing code paths in the files shown.

Full review: no issues found.

Want a deeper review? Comment /review improve on its own line: a full review of the latest commit with an extra fix-oriented pass (about 2x the cost).

@marcin-kordas-hoc marcin-kordas-hoc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At 40bb54a with hyperformula-tests at 729e83ddd3, the TOROW and TOCOL specs pass 303/303 and the full Jest suite passes 15,185, as the description says. Returning #N/A instead of #CALC! fails 10 tests, and 20 of the 22 single-branch mutants I made of the new code fail at least one test. In Excel Online, 74 of 98 TOROW and TOCOL cases match, including the six documentation examples, and the Excel values in the new list-of-differences.md rows are the ones I measured. Of the other 24, 8 are behaviours the docs or the description already list, 8 are blank cells that Excel shows as 0 (VSTACK and FILTER do the same on develop), 6 use the text "TRUE" or "FALSE", which my Polish workbook only accepts as "PRAWDA" or "FAŁSZ", and 2 are the case in my inline comment. The Polish names match Excel; I couldn't check the other language packs. Bugbot's empty-text ignore finding doesn't reproduce: =TOCOL(D!A1:C3,"") in A1 with a value in A3 returns #VALUE! here and in Excel.

sizeOfResultArrayMethod: 'tocolArraySize',
enableArrayArithmeticForArguments: true,
parameters: [
{argumentType: FunctionArgumentType.RANGE},

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blocking: With ignore 2 or 3, a source that is one cell holding an error returns that error; Excel Online returns #CALC!. =TOCOL(D!H1,2) with =1/0 in D!H1 gives #DIV/0! here, as do TOCOL(D!H1:H1,2), TOCOL(D!H1,3) and TOROW(D!H1,2). runFunction returns a RANGE argument's error before the flatten callback runs, and removing that return also turns TOCOL(NA(),2) into #CALC!, where Excel keeps #N/A. Could this PR add a list-of-differences.md row and a test for it, with the fix tracked in HF-608?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the rows for both functions in 349b219. The test was already there (=TOCOL(Fixture!E4,2) expects #DIV/0!), and c6f6f0d adds ignore 3 and the one-cell range E4:E4.

…ore skips errors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	CHANGELOG.md
#	hyperformula/src/license/functionCapabilities.ts

@handsontable-pr-review handsontable-pr-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

High risk: Adds TOROW/TOCOL to the core interpreter and modifies the license capability table, which gates function availability at runtime for all licensed users.

Incremental review: 2 potential issue(s).

hyperformula/src/i18n/languages/ptPT.ts:443

PERCENTRANK.EXC translation typo breaks the localized name

Low severity

The new entry maps 'PERCENTRANK.EXC' to 'ORDEM.PORCENTUAL.EXC', while the base and .INC entries added in the same block use 'ORDEM.PERCENTUAL' (lines 438-439). Portuguese Excel uses ORDEM.PERCENTUAL.EXC, so users typing the correct localized name in a ptPT workbook will get #NAME?, and the wrong name is exposed by translation-dependent APIs.

Suggestion: Change the value to 'ORDEM.PERCENTUAL.EXC'.

hyperformula/src/i18n/languages/nlNL.ts:438

PERCENTRANK base name inconsistent with its .INC/.EXC variants

Low severity

The new entry maps PERCENTRANK to 'PERCENT.RANG', but the .INC and .EXC entries added alongside it (lines 439, 443) use 'PROCENTRANG.INC'/'PROCENTRANG.EXC'. Dutch Excel uses 'PROCENTRANG' for the base function, so the base name is wrong and inconsistent with its own variants, breaking localized formulas that use the documented name.

Suggestion: Change the value to 'PROCENTRANG' to match the .INC/.EXC entries and the Dutch Excel name.

Want a deeper review? Comment /review improve on its own line: a full review of the latest commit with an extra fix-oriented pass (about 2x the cost).

# Conflicts:
#	CHANGELOG.md
#	docs/guide/list-of-differences.md
#	hyperformula/src/license/functionCapabilities.ts
@codecov

codecov Bot commented Nov 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.77%. Comparing base (ce5e52f) to head (3ed23c2).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1828      +/-   ##
===========================================
+ Coverage    97.76%   97.77%   +0.01%     
===========================================
  Files          212      212              
  Lines        19159    19248      +89     
  Branches      4540     4544       +4     
===========================================
+ Hits         18730    18819      +89     
+ Misses         429      421       -8     
- Partials         0        8       +8     
Files with missing lines Coverage Δ
hyperformula/src/i18n/languages/csCZ.ts 100.00% <ø> (ø)
hyperformula/src/i18n/languages/daDK.ts 100.00% <ø> (ø)
hyperformula/src/i18n/languages/deDE.ts 100.00% <ø> (ø)
hyperformula/src/i18n/languages/enGB.ts 100.00% <ø> (ø)
hyperformula/src/i18n/languages/esES.ts 100.00% <ø> (ø)
hyperformula/src/i18n/languages/fiFI.ts 100.00% <ø> (ø)
hyperformula/src/i18n/languages/frFR.ts 100.00% <ø> (ø)
hyperformula/src/i18n/languages/huHU.ts 100.00% <ø> (ø)
hyperformula/src/i18n/languages/idID.ts 100.00% <ø> (ø)
hyperformula/src/i18n/languages/itIT.ts 100.00% <ø> (ø)
... and 10 more

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants