Skip to content

Add TEXTJOIN function#1625

Open
marcin-kordas-hoc wants to merge 3 commits intohandsontable:developfrom
marcin-kordas-hoc:feature/TEXTJOIN_w_docs
Open

Add TEXTJOIN function#1625
marcin-kordas-hoc wants to merge 3 commits intohandsontable:developfrom
marcin-kordas-hoc:feature/TEXTJOIN_w_docs

Conversation

@marcin-kordas-hoc
Copy link

@marcin-kordas-hoc marcin-kordas-hoc commented Feb 26, 2026

Summary

  • Implements TEXTJOIN(delimiter, ignore_empty, text1, [text2, …]) in TextPlugin
  • Supports scalar and array/range delimiters (with cycling when delimiter is a range)
  • Skips empty strings when ignore_empty is TRUE; includes them when FALSE
  • Returns #VALUE! when the result exceeds 32,767 characters (Excel cell limit)
  • Adds ErrorMessage.TextJoinResultTooLong for the length-exceeded error
  • Adds translations for all 17 supported languages
  • Documents the function in docs/guide/built-in-functions.md

Test plan

  • 22 unit tests in test/textjoin.spec.ts covering basic usage, ignore_empty behaviour, array/range delimiters with cycling, type coercion, error propagation, and edge cases
  • Smoke tests in test/smoke.spec.ts include TEXTJOIN scenarios
  • All 41 tests pass (npm run test:jest)
  • TypeScript compiles without errors (npm run compile)
  • No lint errors (npm run lint)

Note

Medium Risk
Adds a new built-in formula function in the interpreter, including range flattening/coercion and a hard output-length limit, which could affect evaluation behavior and error propagation in text-heavy sheets. Changes are localized but touch core formula execution paths and add broad i18n updates.

Overview
Adds the TEXTJOIN(delimiter, ignore_empty, text1, ...) built-in function, supporting scalar or range/array delimiters (cycled between joined values), optional skipping of empty strings, and a new #VALUE! error when the output exceeds 32,767 characters via ErrorMessage.TextJoinResultTooLong.

Updates function-name translations across all supported languages, documents TEXTJOIN in built-in-functions.md, and adds comprehensive coverage via new textjoin.spec.ts plus additional smoke tests.

Docs demos are switched from embedded CodeSandbox iframes to Stackblitz links, and package-lock.json is updated (notably adding platform-specific esbuild optional packages).

Written by Cursor Bugbot for commit 435556f. This will update automatically on new commits. Configure here.

sequba and others added 3 commits February 20, 2026 13:18
* Fix package-lock file

* Docs: remove CodeSandbox embedded demos and add links to working exa,ples in Stackblitz (handsontable#1621)
- Remove dead code: redundant CellError check after coerceScalarToString in flattenArgToStrings
- Remove empty no-op afterEach callback from textjoin test suite
@marcin-kordas-hoc marcin-kordas-hoc self-assigned this Feb 26, 2026
@marcin-kordas-hoc marcin-kordas-hoc added the Function Feature or bug in formula function label Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Function Feature or bug in formula function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants