Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Added

- Added the `TAKE` dynamic-array function. [#1722](https://github.com/handsontable/hyperformula/pull/1722)

### Changed

- **Breaking change**: Replaced the placeholder English `VSTACK` and `HSTACK` names with their official localized names in 14 language packs. Formulas parsed with one of those language packs must use the localized function names. [#1722](https://github.com/handsontable/hyperformula/pull/1722)

## [3.4.0] - 2026-08-10

### Added
Expand Down
2 changes: 2 additions & 0 deletions docs/guide/list-of-differences.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ To remove the differences, create [custom implementations](custom-functions.md)
| NORMSDIST | =NORMSDIST(0, TRUE()) | 0.5 | Wrong number | Wrong number |
| ADDRESS | =ADDRESS(1,1,4, TRUE(), "") | !A1 | ''!A1 | !A1 |
| SEQUENCE | =SEQUENCE(0) | VALUE | N/A | CALC |
| TAKE | =TAKE(A1:A3, 0) | N/A | No such function. | CALC |
| TAKE | =TAKE(Data!A:A, , 1) | Spills the whole column from row 1; returns SPILL below row 1. | No such function. | Spills the whole column from row 1; returns SPILL below row 1. |
| INT | =INT(-8.9) | -8 | -9 | -9 |
| MOD | =MOD(-10, 3) | -1 | 2 | 2 |
| ISEVEN | =ISEVEN(2.5) | FALSE | TRUE | TRUE |
Expand Down
6 changes: 6 additions & 0 deletions docs/guide/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ This page lists HyperFormula release notes. The format is based on
HyperFormula adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Changed

- **Breaking change**: The Czech, Danish, German, Spanish, Finnish, French, Hungarian, Italian, Norwegian Bokmål, Dutch, Polish, Portuguese, Russian, and Turkish language packs now use the official localized names for `VSTACK` and `HSTACK`. If an existing formula uses the English `VSTACK` or `HSTACK` name while one of these language packs is active, update that formula to the localized function name exported by the language pack.

## 3.4.0

**Release date: August 10, 2026**
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/types-of-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ according to the language settings.
| #VALUE! | Wrong type of argument | It occurs when a formula tries to improperly use different types of data. For example, you will see this error when you will try to add a string to a number. |
| #CYCLE! | Circular reference | It occurs when a formula refers to its own cell, both directly and indirectly. |
| #ERROR! | An error occurred | It indicates that there is an unknown error in a formula. |
| #LIC! | Invalid license key | It occurs when the license key is invalid, expired, or missing. |
| #LIC! | Invalid license key | It occurs when the license key is invalid, expired, or missing. |
1 change: 1 addition & 0 deletions src/error-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export class ErrorMessage {
public static IncorrectDateTime = 'String does not represent correct DateTime.'
public static CharacterCodeBounds = 'Character code out of bounds.'
public static NonZero = 'Argument cannot be 0.'
public static ZeroRowOrColumnCount = 'Row or column count cannot be zero.'
public static LessThanOne = 'Argument cannot be less than 1.'
public static WeekendString = 'Incorrect weekend bitmask string.'
public static InvalidRoman = 'Invalid roman numeral.'
Expand Down
5 changes: 3 additions & 2 deletions src/i18n/languages/csCZ.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const dictionary: RawTranslationPackage = {
},
functions: {
FILTER: 'FILTER',
VSTACK: 'VSTACK',
HSTACK: 'HSTACK',
VSTACK: 'SROVNAT.SVISLE',
HSTACK: 'SROVNAT.VODOROVNĚ',
ADDRESS: 'ODKAZ',
'ARRAY_CONSTRAIN': 'ARRAY_CONSTRAIN',
ARRAYFORMULA: 'ARRAYFORMULA',
Expand Down Expand Up @@ -225,6 +225,7 @@ const dictionary: RawTranslationPackage = {
SWITCH: '',
SYD: 'ODPIS.NELIN',
T: 'T',
TAKE: 'VZÍT',
TAN: 'TG',
TANH: 'TGH',
TBILLEQ: 'TBILLEQ',
Expand Down
5 changes: 3 additions & 2 deletions src/i18n/languages/daDK.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const dictionary: RawTranslationPackage = {
},
functions: {
FILTER: 'FILTER',
VSTACK: 'VSTACK',
HSTACK: 'HSTACK',
VSTACK: 'LSTAK',
HSTACK: 'VSTAK',
Comment thread
cursor[bot] marked this conversation as resolved.
ADDRESS: 'ADRESSE',
'ARRAY_CONSTRAIN': 'ARRAY_CONSTRAIN',
ARRAYFORMULA: 'ARRAYFORMULA',
Expand Down Expand Up @@ -225,6 +225,7 @@ const dictionary: RawTranslationPackage = {
SWITCH: '',
SYD: 'ÅRSAFSKRIVNING',
T: 'T',
TAKE: 'TAG',
TAN: 'TAN',
TANH: 'TANH',
TBILLEQ: 'STATSOBLIGATION',
Expand Down
5 changes: 3 additions & 2 deletions src/i18n/languages/deDE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const dictionary: RawTranslationPackage = {
},
functions: {
FILTER: 'FILTER',
VSTACK: 'VSTACK',
HSTACK: 'HSTACK',
VSTACK: 'VSTAPELN',
HSTACK: 'HSTAPELN',
ADDRESS: 'ADRESSE',
'ARRAY_CONSTRAIN': 'ARRAY_CONSTRAIN',
ARRAYFORMULA: 'ARRAYFORMULA',
Expand Down Expand Up @@ -225,6 +225,7 @@ const dictionary: RawTranslationPackage = {
SWITCH: '',
SYD: 'DIA',
T: 'T',
TAKE: 'ÜBERNEHMEN',
TAN: 'TAN',
TANH: 'TANHYP',
TBILLEQ: 'TBILLÄQUIV',
Expand Down
1 change: 1 addition & 0 deletions src/i18n/languages/enGB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ const dictionary: RawTranslationPackage = {
SWITCH: 'SWITCH',
SYD: 'SYD',
T: 'T',
TAKE: 'TAKE',
TAN: 'TAN',
TANH: 'TANH',
TBILLEQ: 'TBILLEQ',
Expand Down
5 changes: 3 additions & 2 deletions src/i18n/languages/esES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export const dictionary: RawTranslationPackage = {
},
functions: {
FILTER: 'FILTER',
VSTACK: 'VSTACK',
HSTACK: 'HSTACK',
VSTACK: 'APILARV',
HSTACK: 'APILARH',
ADDRESS: 'DIRECCION',
'ARRAY_CONSTRAIN': 'ARRAY_CONSTRAIN',
ARRAYFORMULA: 'ARRAYFORMULA',
Expand Down Expand Up @@ -225,6 +225,7 @@ export const dictionary: RawTranslationPackage = {
SWITCH: '',
SYD: 'SYD',
T: 'T',
TAKE: 'TOMAR',
TAN: 'TAN',
TANH: 'TANH',
TBILLEQ: 'LETRA.DE.TEST.EQV.A.BONO',
Expand Down
5 changes: 3 additions & 2 deletions src/i18n/languages/fiFI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const dictionary: RawTranslationPackage = {
},
functions: {
FILTER: 'FILTER',
VSTACK: 'VSTACK',
HSTACK: 'HSTACK',
VSTACK: 'VPINO',
HSTACK: 'HPINO',
ADDRESS: 'OSOITE',
'ARRAY_CONSTRAIN': 'ARRAY_CONSTRAIN',
ARRAYFORMULA: 'ARRAYFORMULA',
Expand Down Expand Up @@ -225,6 +225,7 @@ const dictionary: RawTranslationPackage = {
SWITCH: '',
SYD: 'VUOSIPOISTO',
T: 'T',
TAKE: 'OTA',
TAN: 'TAN',
TANH: 'TANH',
TBILLEQ: 'OBLIG.TUOTTOPROS',
Expand Down
5 changes: 3 additions & 2 deletions src/i18n/languages/frFR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const dictionary: RawTranslationPackage = {
},
functions: {
FILTER: 'FILTER',
VSTACK: 'VSTACK',
HSTACK: 'HSTACK',
VSTACK: 'ASSEMB.V',
HSTACK: 'ASSEMB.H',
ADDRESS: 'ADRESSE',
'ARRAY_CONSTRAIN': 'ARRAY_CONSTRAIN',
ARRAYFORMULA: 'ARRAYFORMULA',
Expand Down Expand Up @@ -225,6 +225,7 @@ const dictionary: RawTranslationPackage = {
SWITCH: '',
SYD: 'SYD',
T: 'T',
TAKE: 'PRENDRE',
TAN: 'TAN',
TANH: 'TANH',
TBILLEQ: 'TAUX.ESCOMPTE.R',
Expand Down
5 changes: 3 additions & 2 deletions src/i18n/languages/huHU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const dictionary: RawTranslationPackage = {
},
functions: {
FILTER: 'FILTER',
VSTACK: 'VSTACK',
HSTACK: 'HSTACK',
VSTACK: 'FÜGG.HALMOZÁS',
HSTACK: 'VÍZSZ.HALMOZÁS',
ADDRESS: 'CÍM',
'ARRAY_CONSTRAIN': 'ARRAY_CONSTRAIN',
ARRAYFORMULA: 'ARRAYFORMULA',
Expand Down Expand Up @@ -225,6 +225,7 @@ const dictionary: RawTranslationPackage = {
SWITCH: '',
SYD: 'ÉSZÖ',
T: 'T',
TAKE: 'ÁTHELYEZ',
TAN: 'TAN',
TANH: 'TANH',
TBILLEQ: 'KJEGY.EGYENÉRT',
Expand Down
1 change: 1 addition & 0 deletions src/i18n/languages/idID.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ const dictionary: RawTranslationPackage = {
SWITCH: 'BERALIH',
SYD: 'SYD',
T: 'T',
TAKE: 'TAKE',
TAN: 'TAN',
TANH: 'TANH',
TBILLEQ: 'TBILL.SAMA',
Expand Down
5 changes: 3 additions & 2 deletions src/i18n/languages/itIT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const dictionary: RawTranslationPackage = {
},
functions: {
FILTER: 'FILTER',
VSTACK: 'VSTACK',
HSTACK: 'HSTACK',
VSTACK: 'STACK.VERT',
HSTACK: 'STACK.ORIZ',
ADDRESS: 'INDIRIZZO',
'ARRAY_CONSTRAIN': 'ARRAY_CONSTRAIN',
ARRAYFORMULA: 'ARRAYFORMULA',
Expand Down Expand Up @@ -225,6 +225,7 @@ const dictionary: RawTranslationPackage = {
SWITCH: '',
SYD: 'AMMORT.ANNUO',
T: 'T',
TAKE: 'INCLUDI',
TAN: 'TAN',
TANH: 'TANH',
TBILLEQ: 'BOT.EQUIV',
Expand Down
5 changes: 3 additions & 2 deletions src/i18n/languages/nbNO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const dictionary: RawTranslationPackage = {
},
functions: {
FILTER: 'FILTER',
VSTACK: 'VSTACK',
HSTACK: 'HSTACK',
VSTACK: 'VSTAKK',
HSTACK: 'HSTAKK',
ADDRESS: 'ADRESSE',
'ARRAY_CONSTRAIN': 'ARRAY_CONSTRAIN',
ARRAYFORMULA: 'ARRAYFORMULA',
Expand Down Expand Up @@ -225,6 +225,7 @@ const dictionary: RawTranslationPackage = {
SWITCH: '',
SYD: 'ÅRSAVS',
T: 'T',
TAKE: 'TA',
TAN: 'TAN',
TANH: 'TANH',
TBILLEQ: 'TBILLEKV',
Expand Down
5 changes: 3 additions & 2 deletions src/i18n/languages/nlNL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const dictionary: RawTranslationPackage = {
},
functions: {
FILTER: 'FILTER',
VSTACK: 'VSTACK',
HSTACK: 'HSTACK',
VSTACK: 'VERT.STAPELEN',
HSTACK: 'HOR.STAPELEN',
ADDRESS: 'ADRES',
'ARRAY_CONSTRAIN': 'ARRAY_CONSTRAIN',
ARRAYFORMULA: 'ARRAYFORMULA',
Expand Down Expand Up @@ -225,6 +225,7 @@ const dictionary: RawTranslationPackage = {
SWITCH: '',
SYD: 'SYD',
T: 'T',
TAKE: 'NEMEN',
TAN: 'TAN',
TANH: 'TANH',
TBILLEQ: 'SCHATK.OBL',
Expand Down
5 changes: 3 additions & 2 deletions src/i18n/languages/plPL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const dictionary: RawTranslationPackage = {
},
functions: {
FILTER: 'FILTER',
VSTACK: 'VSTACK',
HSTACK: 'HSTACK',
VSTACK: 'STOS.PION',
HSTACK: 'STOS.POZ',
ADDRESS: 'ADRES',
'ARRAY_CONSTRAIN': 'ARRAY_CONSTRAIN',
ARRAYFORMULA: 'ARRAYFORMULA',
Expand Down Expand Up @@ -225,6 +225,7 @@ const dictionary: RawTranslationPackage = {
SWITCH: 'PRZEŁĄCZ',
SYD: 'SYD',
T: 'T',
TAKE: 'WYCINEK',
TAN: 'TAN',
TANH: 'TANH',
TBILLEQ: 'RENT.EKW.BS',
Expand Down
5 changes: 3 additions & 2 deletions src/i18n/languages/ptPT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const dictionary: RawTranslationPackage = {
},
functions: {
FILTER: 'FILTER',
VSTACK: 'VSTACK',
HSTACK: 'HSTACK',
VSTACK: 'JUNTARV',
HSTACK: 'JUNTARH',
ADDRESS: 'ENDEREÇO',
'ARRAY_CONSTRAIN': 'ARRAY_CONSTRAIN',
ARRAYFORMULA: 'ARRAYFORMULA',
Expand Down Expand Up @@ -225,6 +225,7 @@ const dictionary: RawTranslationPackage = {
SWITCH: '',
SYD: 'SDA',
T: 'T',
TAKE: 'INCLUIR',
Comment thread
cursor[bot] marked this conversation as resolved.
TAN: 'TAN',
TANH: 'TANH',
TBILLEQ: 'OTN',
Expand Down
5 changes: 3 additions & 2 deletions src/i18n/languages/ruRU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const dictionary: RawTranslationPackage = {
},
functions: {
FILTER: 'FILTER',
VSTACK: 'VSTACK',
HSTACK: 'HSTACK',
VSTACK: 'ВСТОЛБИК',
HSTACK: 'ГСТОЛБИК',
ADDRESS: 'АДРЕС',
'ARRAY_CONSTRAIN': 'ARRAY_CONSTRAIN',
ARRAYFORMULA: 'ARRAYFORMULA',
Expand Down Expand Up @@ -225,6 +225,7 @@ const dictionary: RawTranslationPackage = {
SWITCH: '',
SYD: 'АСЧ',
T: 'Т',
TAKE: 'ВЗЯТЬ',
TAN: 'TAN',
TANH: 'TANH',
TBILLEQ: 'РАВНОКЧЕК',
Expand Down
1 change: 1 addition & 0 deletions src/i18n/languages/svSE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ const dictionary: RawTranslationPackage = {
SWITCH: '',
SYD: 'ÅRSAVSKR',
T: 'T',
TAKE: 'TA',
TAN: 'TAN',
TANH: 'TANH',
TBILLEQ: 'SSVXEKV',
Expand Down
5 changes: 3 additions & 2 deletions src/i18n/languages/trTR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const dictionary: RawTranslationPackage = {
},
functions: {
FILTER: 'FILTER',
VSTACK: 'VSTACK',
HSTACK: 'HSTACK',
VSTACK: 'DÜŞEYYIĞ',
HSTACK: 'YATAYYIĞ',
ADDRESS: 'ADRES',
'ARRAY_CONSTRAIN': 'ARRAY_CONSTRAIN',
ARRAYFORMULA: 'ARRAYFORMULA',
Expand Down Expand Up @@ -225,6 +225,7 @@ const dictionary: RawTranslationPackage = {
SWITCH: '',
SYD: 'YAT',
T: 'T',
TAKE: 'AL',
TAN: 'TAN',
TANH: 'TANH',
TBILLEQ: 'HTAHEŞ',
Expand Down
8 changes: 5 additions & 3 deletions src/interpreter/functionMetadata/buildFunctionDescriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* placeholder.
*/

import {FunctionMetadata, FunctionArgument} from '../plugin/FunctionPlugin'
import {FunctionMetadata, FunctionArgument, isFunctionArgumentOptional} from '../plugin/FunctionPlugin'
import {CUSTOM_FUNCTION_CATEGORY, FunctionDoc, FunctionListEntry, FunctionDetails, FunctionParameterDescription} from './FunctionDescription'

/** Resolves a function's display name: the translation for the active language, or the canonical id as fallback. */
Expand All @@ -33,12 +33,14 @@ type TranslateName = (canonicalName: string) => string | undefined
export type StructuralMetadata = Pick<FunctionMetadata, 'parameters' | 'repeatLastArgs'>

/**
* Returns whether a parameter may be omitted: it declares `optionalArg`, or it has a `defaultValue`.
* Returns whether a parameter may be omitted. An explicit `optionalArg`
* declaration takes precedence; otherwise, a `defaultValue` makes the
* parameter optional.
*
* @param {FunctionArgument | undefined} arg - the structural argument metadata, or `undefined`
*/
export function isParameterOptional(arg: FunctionArgument | undefined): boolean {
return arg?.optionalArg === true || arg?.defaultValue !== undefined
return isFunctionArgumentOptional(arg)
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ export const LOOKUP_AND_REFERENCE_DOCS: Record<string, FunctionDoc> = {
documentationUrl: 'https://hyperformula.handsontable.com/docs/guide/built-in-functions.html',
examples: ['=SORT(A1:A10)', '=SORT(A1:B10, 2, -1)'],
},
TAKE: {
category: 'Lookup and reference',
shortDescription: 'Returns specified rows or columns from the beginning or end of an array.',
parameters: [{name: 'array', description: 'The array or range from which to take rows or columns.'}, {name: 'rows', description: 'The number of rows to take; a negative value takes rows from the end. An empty argument keeps all rows.'}, {name: 'columns', description: 'The number of columns to take; a negative value takes columns from the end. When omitted or empty, all columns are kept.'}],
documentationUrl: 'https://hyperformula.handsontable.com/docs/guide/built-in-functions.html',
examples: ['=TAKE(A1:C5, 2)', '=TAKE(A1:C5, -2, -1)', '=TAKE(A1:C5, , 2)'],
},
TRANSPOSE: {
category: 'Lookup and reference',
shortDescription: 'Transposes the rows and columns of an array.',
Expand Down
Loading
Loading