Repository navigation
Fix localized VSTACK and HSTACK names - #1748
Conversation
|
@Tobiadefami thanks for the pull request. No CLA step needed here — our records show you signed the Contributor License Agreement on 2026-07-31. That signature came from our previous signing form and has been carried over, so there is nothing for you to re-sign. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1748 +/- ##
========================================
Coverage 97.31% 97.31%
========================================
Files 195 195
Lines 15719 15719
Branches 3455 3384 -71
========================================
Hits 15297 15297
- Misses 414 422 +8
+ Partials 8 0 -8
🚀 New features to boost your workflow:
|
Performance comparison of head (a6e8b1c) vs base (286a731) |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
hyperformula-docs | a6e8b1c | Commit Preview URL Branch Preview URL |
Sep 02 2026, 10:06 AM |
The incorrect English names in 14 locales were a bug in 3.4.0, not an intentional design. This change fixes that bug. Co-authored-by: Kuba Sekowski <sequba@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 291131d. Configure here.
### Context This PR adds the `TAKE` dynamic-array function. `TAKE` returns rows or columns from the beginning or end of an array and supports positive and negative counts, optional columns, syntactically empty argument slots, and array spilling. A row or column count that truncates to zero returns the existing `#N/A` error with a TAKE-specific message. This is a documented Excel difference because HyperFormula does not expose a `#CALC!` error type. `rows` is required, as in Excel, but may be left empty: `=TAKE(A1:C3,,2)` keeps every row. Omitting it returns the existing wrong-argument `#N/A` error, and `getFunctionDetails` reports it as required. Implementation: - Counts are truncated and clamped to the source dimensions; negative counts select from the end. - Address-backed sources remain lazy through sub-range spans. - Static spill-size prediction evaluates dependency-free literal percentages and arithmetic, so invalid counts and literal errors are resolved before spill allocation. - Whole-column sources without a count spill from row 1 and return `#SPILL!` below row 1. Below row 1, a count read from a cell spills when the result fits the area reserved for it, and returns `#SPILL!` when the result is taller. Finite counts are capped to configured sheet limits before allocation. - Function metadata, translations, changelog, and compatibility documentation are included. - The VSTACK/HSTACK localization fix now lives in #1748 and is not part of this PR. ### How did you test your changes? - Tests PR: handsontable/hyperformula-tests#28, 107 focused `TAKE` tests, plus the `TAKE` entry in `function-metadata-api.spec.ts`. - Full Jest suite with the private tests, after merging `develop`: 528 suites, 7,327 tests passed, 3 skipped. - Removing the empty-`rows` handling fails 19 of the `TAKE` tests. - `npm run verify:typings`, `npm run lint` (0 errors), `npm run docs:generate-function-docs` and `git diff --check` pass. ### AI assistance Claude Code wrote the code, tests and docs. I reviewed it. ### Compatibility with Excel and Google Sheets Excel: Microsoft Excel Online. Google Sheets has no `TAKE`. In the examples, A1:C3 holds 1 to 9 row by row. | Formula | Excel | Google Sheets | HyperFormula | |---|---|---|---| | `=TAKE(A1:C3,,2)` | 1, 2 / 4, 5 / 7, 8 | – | 1, 2 / 4, 5 / 7, 8 | | `=TAKE(A1:C3,,)` | the whole range | – | the whole range | | `=TAKE(A1:C3)` | not accepted (too few arguments) | – | `#N/A` | | `=TAKE(A1:A3,0)` | `#CALC!` | – | `#N/A` | Excel also confirmed the same-sheet and cross-sheet whole-column behavior and the row-1 spill boundary. The deliberate differences (the zero count, whole-column and whole-row sources, a count read from a cell below row 1, an error count) are listed in `list-of-differences.md`. ### Public API changes None. One new built-in function. ### Out of scope and follow-ups - Returning `#CALC!` for a zero count needs the `#CALC!` error type (#1889). ### Types of changes - [ ] Breaking change (existing functionality no longer works as before) – agreed with the maintainers - [x] 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. HF-142 (`TAKE`). 2. Tests: handsontable/hyperformula-tests#28 ### 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). - [x] I have signed the [Contributor License Agreement](https://goo.gl/forms/yuutGuN0RjsikVpM2). - [ ] 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) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > New dynamic-array spill and sizing logic in `ArrayPlugin` can interact with whole-column references and spill placement; scope is additive but touches core array evaluation paths. > > **Overview** > Adds the Excel-style **`TAKE`** dynamic-array function so formulas can return a sub-range from the start or end of a source array, with optional row/column counts, empty argument slots, and spill behavior. > > **`ArrayPlugin`** now implements evaluation (truncated counts, negative indices from the end, lazy sub-ranges for address-backed sources) and **`takeArraySize`** spill prediction via static parsing of literal count expressions. A zero row/column count returns **`#N/A`** with a new **`ZeroRowOrColumnCount`** message (documented vs Excel’s `#CALC!`). > > **`Interpreter.isFunctionImplementedBy`** supports that static sizing path. **`TAKE`** is wired into function metadata, license capabilities, changelog, compatibility docs, and all language packs. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 6b4b1c0. 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: Kuba Sekowski <kuba.sekowski.dev@gmail.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Kuba Sekowski <jakub.sekowski@handsontable.com>

Context
HyperFormula 3.4.0 shipped
VSTACKandHSTACKwith English placeholder names in language packs where Microsoft Excel uses localized names. This PR moves the previously reviewed localization fix out of the unrelated TAKE PR and into a dedicated change.This extracts the VSTACK/HSTACK portion of commit
b902d53bc, originally authored by Kuba Sekowski.Changes
SROVNAT.SVISLESROVNAT.VODOROVNĚVSTAKHSTAKVSTAPELNHSTAPELNAPILARVAPILARHVPINOHPINOASSEMB.VASSEMB.HFÜGG.HALMOZÁSVÍZSZ.HALMOZÁSSTACK.VERTSTACK.ORIZVSTAKKHSTAKKVERT.STAPELENHOR.STAPELENSTOS.PIONSTOS.POZJUNTARVJUNTARHВСТОЛБИКГСТОЛБИКDÜŞEYYIĞYATAYYIĞIndonesian and Swedish remain in English, matching Excel. The PR also adds source-verification guidance to
DEV_DOCS.mdand an Unreleased changelog entry.Source verification
All 14 localized pairs and the unchanged Indonesian and Swedish pairs were checked on 2026-08-25 against Microsoft Support's current individual VSTACK/HSTACK pages, using each page title and displayed formula syntax. This caught one mismatch in the original table: Danish is
VSTAK/HSTAK.Microsoft's Danish alphabetical function index currently conflicts with those individual pages, so
DEV_DOCS.mdnow requires checking the linked individual page rather than copying a name from the index alone.Migration note
This is a breaking change for formulas created with HyperFormula 3.4.0 that use English
VSTACKorHSTACKwhile one of the affected language packs is active. Those formulas must switch to the names listed above.Validation
Companion tests: handsontable/hyperformula-tests#44
git diff --checkpassed.Types of changes
Note
Medium Risk
Breaking change for stored formulas that use English VSTACK/HSTACK under affected locales; runtime behavior is unchanged once formulas use the correct localized names.
Overview
Replaces English placeholder names for VSTACK and HSTACK with Microsoft Excel’s localized identifiers in 14 built-in language packs (Czech, Danish, German, Spanish, Finnish, French, Hungarian, Italian, Norwegian, Dutch, Polish, Portuguese, Russian, Turkish). Indonesian and Swedish stay in English, consistent with Excel.
DEV_DOCS.mdnow requires confirming localized names against Excel (including per-locale checks on Microsoft’s individual function pages when the alphabetical index disagrees) and keeping English when Excel does not ship a translation. An Unreleased changelog entry documents the fix.Breaking change: With one of the updated locales active, formulas that still call
VSTACKorHSTACKin English (as in HyperFormula 3.4.0) must use the new localized names or they will not parse.Reviewed by Cursor Bugbot for commit a6e8b1c. Bugbot is set up for automated code reviews on this repo. Configure here.