Skip to content

Add TEXTJOIN function#1625

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

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

Conversation

@marcin-kordas-hoc
Copy link
Collaborator

@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 core formula function in the interpreter (TEXTJOIN) with range handling, delimiter cycling, and a new #VALUE! error path, which could affect calculation behavior in edge cases. Changes are additive and well-covered by new unit/smoke tests.

Overview
Adds support for the TEXTJOIN(delimiter, ignore_empty, text1, [text2, …]) formula, including scalar or range/array delimiters (cycled between joined parts), optional skipping of empty strings, and propagation of cell errors from delimiter/text inputs.

Introduces a new ErrorMessage.TextJoinResultTooLong and returns #VALUE! when the joined result exceeds 32,767 characters. Updates built-in function documentation, adds TEXTJOIN translations across supported languages, and adds dedicated TEXTJOIN unit tests plus smoke coverage.

Written by Cursor Bugbot for commit cfa61b5. 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
Copy link
Contributor

@sequba sequba left a comment

Choose a reason for hiding this comment

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

Good job

Per code review: smoke.spec.ts should stay minimal. All TEXTJOIN tests
are now consolidated in textjoin.spec.ts, covering individual cell
references, single-ref args, and explicit empty-string vs null cell
behaviour for ignore_empty=TRUE/FALSE.
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