Skip to content
Merged
Show file tree
Hide file tree
Changes from 54 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
0a966e3
HF-307 PR 1: entitlement model, capability registry, gate B (#307)
marcin-kordas-hoc Aug 11, 2026
8db1a21
Merge up/develop into hf-307-entitlement-gating-pr1
marcin-kordas-hoc Sep 18, 2026
54ce850
refactor(HF-307): drop the unused implication step from capability gr…
marcin-kordas-hoc Sep 22, 2026
40ad18a
fix(HF-307): split the unrestricted capability flag into two axes
marcin-kordas-hoc Sep 22, 2026
954d8c8
HF-307 PR 2: public API guards (ensureCapability) (#1729)
marcin-kordas-hoc Sep 24, 2026
6502eab
HF-307: license key reader (entitlement key format, rev 6), resolutio…
marcin-kordas-hoc Sep 24, 2026
5b8c91b
HF-307: align getRegisteredFunctionNames with the license gate, depre…
marcin-kordas-hoc Sep 24, 2026
7c41e1d
Merge branch 'develop' into hf-307-entitlement-gating-pr1
sequba Sep 24, 2026
dad51a4
Apply suggestion from @sequba
sequba Sep 24, 2026
bfe7004
Apply suggestion from @sequba
sequba Sep 24, 2026
f2e590e
Apply suggestion from @sequba
sequba Sep 24, 2026
1a1db86
HF-307: drop the add-on tokens, the deprecation, and the gate-active …
marcin-kordas-hoc Sep 24, 2026
81dca2d
HF-307: pin the one behaviour change the diff was not admitting to
marcin-kordas-hoc Sep 24, 2026
d6d7786
Apply suggestion from @sequba
sequba Sep 28, 2026
86e5c65
Refactor capabilities
sequba Sep 28, 2026
2ea4fb5
HF-307: option 1 — the vendored reader stops diverging from upstream
marcin-kordas-hoc Sep 29, 2026
56e3e49
HF-307: correct two comments that a reproduction showed to be false
marcin-kordas-hoc Sep 30, 2026
adc39bd
HF-307: make the vendored-parser drift check a real check, and it imm…
marcin-kordas-hoc Sep 30, 2026
568b4a1
HF-307: finish option 1 — the vendored reader is now byte-identical t…
marcin-kordas-hoc Sep 30, 2026
04673be
HF-307: vendor the reader upstream publishes for products, not the pa…
marcin-kordas-hoc Sep 30, 2026
71a0af6
HF-307: the drift check verifies the tag still points at the pinned c…
marcin-kordas-hoc Sep 30, 2026
e0ed3e1
HF-307: codecov ignores the vendored reader; the drift workflow decla…
marcin-kordas-hoc Sep 30, 2026
997e5b5
HF-307: the drift check names a tag/commit mismatch as one, not as an…
marcin-kordas-hoc Sep 30, 2026
38500f7
HF-307: when the listing fails, the drift check says what the pin che…
marcin-kordas-hoc Sep 30, 2026
4e876b8
Rename vendored parser check to license-key-parser-drift
cursoragent Sep 30, 2026
8e47e2b
HF-307: read entitlement keys through readEntitlementLicense, as upst…
marcin-kordas-hoc Oct 1, 2026
96a7b17
HF-307: comments say what the code does after the reader switch
marcin-kordas-hoc Oct 1, 2026
85dc976
HF-307: an expired non-trial entitlement key no longer blocks evaluation
marcin-kordas-hoc Oct 1, 2026
670b46a
HF-307: the license guide no longer names key formats when explaining…
marcin-kordas-hoc Oct 1, 2026
e929f23
HF-307: entitlement keys print the specification's console messages, …
marcin-kordas-hoc Oct 2, 2026
153920b
HF-307: dedupe entitlement messages per key and message, not per key
marcin-kordas-hoc Oct 2, 2026
fc59e57
HF-307: license comments describe behaviour, not ticket history
sequba Oct 5, 2026
b0ee8e4
Describe what the docs generator's license key does now that function…
marcin-kordas-hoc Oct 6, 2026
7fcbd3a
Fix tests
sequba Oct 7, 2026
f174669
Merge branch 'hf-307-entitlement-gating-pr1' of github.com:handsontab…
sequba Oct 7, 2026
1919fd0
HF-307: re-take the vendored entitlement-key reader from license-key …
sequba Oct 7, 2026
5a3edb9
Remove license status from VERSION function output
cursoragent Oct 7, 2026
42a3c7c
Remove unused entitlementKeyChecksumOf function
cursoragent Oct 7, 2026
d97478c
HF-307: read the license once per interpreter and resolve aliases in …
sequba Oct 7, 2026
3076f28
HF-307: expose the missing feature on the license error, and trim the…
sequba Oct 7, 2026
9f34759
HF-307: document that a bad key blocks the gated API, and VERSION's n…
sequba Oct 7, 2026
c341a14
HF-307: make the vendored-reader drift check robust
sequba Oct 7, 2026
459ef82
HF-307: classify drift-check failures precisely and name the pinned c…
sequba Oct 7, 2026
0d00cec
HF-307: make isItPossibleTo* agree with the license, and correct the …
sequba Oct 7, 2026
5f41ad0
HF-307: classify every lifecycle state of the key reader in one exhau…
sequba Oct 7, 2026
bf6b804
HF-307: the getAvailableFunctions docs no longer name a key field
sequba Oct 7, 2026
867774e
HF-307: changelog notes what a blocking key does to the gated API
sequba Oct 7, 2026
0efee29
HF-307: pass a license key in every guide example
sequba Oct 7, 2026
83324a7
HF-307: describe src/license and the capability table in DEV_DOCS
sequba Oct 7, 2026
f05cd2d
HF-307: pass a license key in every API reference example
sequba Oct 7, 2026
bf5ceeb
HF-307: fix four API reference examples that threw for their own reasons
sequba Oct 7, 2026
8020cf6
HF-307: isThereSomethingToUndo and isThereSomethingToRedo answer fals…
sequba Oct 7, 2026
402bca4
HF-307: a stopped array function evaluates to #LIC! in its own cell
sequba Oct 7, 2026
d952c7d
HF-307: moving or pasting a formula with an undefined name no longer …
sequba Oct 7, 2026
3e8ffcf
Rephrase and shorten changelog entry for undefined name bug fix
cursoragent Oct 7, 2026
c6ccee4
Remove duplicate changelog entry (keep shorter version)
cursoragent Oct 7, 2026
f9819f7
Remove array function spill range changelog entry
cursoragent Oct 7, 2026
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
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ docs/examples/
# 3rd party
src/interpreter/plugin/3rdparty

# A byte-identical copy of handsontable/license-key's vendor/entitlement-key-reader - see
# PROVENANCE.md in that directory. Linting it would mean editing it, and editing it is the one
# thing it must not have; upstream runs strict tsc on it instead.
src/license/handsontable-license-key-parser/*.ts

# Configurations
*.config.js
karma.*
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/vendored-parser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Vendored parser

# The entitlement-key reader under src/license/handsontable-license-key-parser/ is a verbatim
# copy of a private upstream directory. This job is the drift check that copy's integration guide
# asks for: it fails when any byte differs from the pinned tag, when a file shadows the copy, or
# when upstream has released a newer tag. See PROVENANCE.md in that directory.
#
# It needs LICENSE_KEY_REPO_TOKEN - a read-only token for handsontable/license-key - as a repository
# secret. Without it the check fails on purpose ("could not verify" is not "verified"), so this job
# stays red until the secret is set. Pull requests from forks never receive secrets and are skipped.

on:
pull_request:
types: [ opened, reopened, synchronize ]
paths:
- 'src/license/handsontable-license-key-parser/**'
- 'script/check-license-key-parser-drift.js'
- '.github/workflows/vendored-parser.yml'
push:
branches: [ master, develop ]
schedule:
- cron: '17 6 * * 1-5' # weekday mornings: a newer upstream tag is news even when nothing here changed

permissions:
contents: read

jobs:
drift:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@722adc63f1aa60a57ec37892e133b1d319cae598 # https://github.com/actions/checkout/releases/tag/v2.0.0
- name: Setup Node.js 22
uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d # https://github.com/actions/setup-node/releases/tag/v1.4.4
with:
node-version: '22'
- name: Compare the vendored reader with upstream
run: node script/check-license-key-parser-drift.js
env:
LICENSE_KEY_REPO_TOKEN: ${{ secrets.LICENSE_KEY_REPO_TOKEN }}
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
1 change: 1 addition & 0 deletions .typedoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = {
"./src/dependencyTransformers/**",
"./src/DependencyGraph/**",
"./src/ColumnSearch/**",
"./src/license/handsontable-license-key-parser/**",
],
"mode": "file",
"out": "./typedoc",
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Added

- Added support for the new license key format. A proprietary key can now grant a subset of the library: a function your key does not include evaluates to a `#LIC!` error, and the matching parts of the API throw a `LicenseCapabilityMissingError`. `getAvailableFunctions()` and `getFunctionDetails()` describe only the functions your key includes. [#1728](https://github.com/handsontable/hyperformula/pull/1728)

### Changed

- Changed the `VERSION` function to return only the HyperFormula version (e.g. `HyperFormula v3.4.0`), without the license key status. [#1728](https://github.com/handsontable/hyperformula/pull/1728)
- Changed the API methods gated by the license key to throw a `LicenseCapabilityMissingError` when the key is missing or invalid, when a classic key has expired, or when a trial key is past its grace period. The gated methods are the ones that edit cells, rows, columns, and sheets, `copy()`, `cut()`, `paste()`, `undo()`, `redo()`, `batch()`, `suspendEvaluation()`, and the methods that add, change, or remove named expressions. Building an engine with named expressions throws the same error, and the matching `isItPossibleTo*()` methods, `isThereSomethingToUndo()`, and `isThereSomethingToRedo()` return `false`. [#1728](https://github.com/handsontable/hyperformula/pull/1728)

Comment thread
sequba marked this conversation as resolved.
Resolved
### Fixed

- Fixed moving or pasting a formula that refers to an undefined name to another sheet adding that name as an empty global named expression: the formula's `#NAME?` error turned into an empty value, and the workbook listed and serialized a named expression nobody added. [#1728](https://github.com/handsontable/hyperformula/pull/1728)
Comment thread
sequba marked this conversation as resolved.
Resolved
- Fixed an array function stopped by the license key reserving its spill range: it filled the whole range with `#LIC!`, or showed `#SPILL!` instead of `#LIC!` when a cell in that range was not empty. It now evaluates to `#LIC!` in its own cell only. [#1728](https://github.com/handsontable/hyperformula/pull/1728)
Comment thread
sequba marked this conversation as resolved.
Resolved
- Fixed the validation of classic (25-character) license keys depending on the time zone: east of UTC, a key that expired the day before the build was released was still accepted, and west of UTC, the console message printed an expiry date one day too early. [#1728](https://github.com/handsontable/hyperformula/pull/1728)
- Fixed the `AVERAGEIF` function returning a division-by-zero error when the calculated average was `0`. [#1733](https://github.com/handsontable/hyperformula/pull/1733)
- Fixed the localized names of `VSTACK` and `HSTACK` in 14 language packs to match Microsoft Excel. [#1748](https://github.com/handsontable/hyperformula/pull/1748)
- Fixed the MAXPOOL and MEDIANPOOL functions throwing an uncaught `TypeError` instead of returning the `#VALUE!` error when the range dimensions are not a whole multiple of the window size and the stride. [#1718](https://github.com/handsontable/hyperformula/pull/1718)
Expand Down
24 changes: 21 additions & 3 deletions DEV_DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ Canonical reference for everyone working on the HyperFormula source code: mainta
│ │ └── plugin/ # Built-in spreadsheet function plugins
│ ├── DependencyGraph/ # Cell dependency tracking and recalculation order
│ ├── CrudOperations.ts # Create/read/update/delete operations on sheets and cells
│ └── i18n/ # Function-name translations per language
│ ├── i18n/ # Function-name translations per language
│ └── license/ # License key reading, capability tables, and license gating
│ └── handsontable-license-key-parser/ # Vendored key reader; do not edit
├── test/ # Test suite
├── docs/ # Public documentation portal (VuePress)
│ ├── guide/ # Markdown guides (building, contributing, usage…)
Expand Down Expand Up @@ -51,6 +53,13 @@ Canonical reference for everyone working on the HyperFormula source code: mainta
- `src/interpreter/` — formula evaluation engine
- `src/DependencyGraph/` — cell dependency tracking and recalculation order
- `src/CrudOperations.ts` — create/read/update/delete operations on sheets and cells
- `src/license/` — license key handling: reads the key, maps its capability tokens to functions (`functionCapabilities.ts`) and public API features (`featureCapabilities.ts`), and gates function calls and API methods

### License key reader (`src/license/handsontable-license-key-parser/`)

A copy of the entitlement-key reader published by the `handsontable/license-key` repository, taken whole from a tagged release. Don't edit it: fix the problem upstream and take the copy again, as described in `PROVENANCE.md` in that directory. ESLint ignores the directory.

`npm run check:license-key-parser-drift` compares the copy with the pinned upstream commit and fails on any difference or on a newer upstream tag. It needs read access to the upstream repository, so it runs in its own CI workflow rather than in `npm run test` or `npm run lint`.

### Function plugins (`src/interpreter/plugin/`)

Expand Down Expand Up @@ -125,8 +134,9 @@ Adding a built-in function is similar to adding a [custom function](docs/guide/c
2. Add function metadata to `implementedFunctions`.
3. Implement the function method.
4. Add a catalogue entry to `src/interpreter/functionMetadata/categories/<category>.ts` (see below).
5. Add translations to all language files in `src/i18n/languages/`.
6. Add tests in `test/unit/interpreter/`.
5. Add the function to the license capability table in `src/license/functionCapabilities.ts` (see below).
6. Add translations to all language files in `src/i18n/languages/`.
7. Add tests in `test/unit/interpreter/`.

### The function metadata catalogue

Expand Down Expand Up @@ -155,6 +165,14 @@ Note what the drift warning does **not** cover: **optionality is not cross-check

Descriptions must describe **HyperFormula's** behaviour, not Excel's. Much of the catalogue was seeded from a hand-written page that documented Excel, and HyperFormula deliberately deviates in places (`INT` truncates toward zero, `ISEVEN`/`ISODD` do not truncate, `CEILING.MATH`/`FLOOR.MATH` honour only `mode` = 1). Verify a claim against the implementation before authoring it, and record any deviation in [the list of differences](docs/guide/list-of-differences.md).

### The license capability table

`src/license/functionCapabilities.ts` decides which license keys can call a built-in function. Add every new built-in either to its group in `FUNCTION_GROUPS` or, if it belongs to no group, to `UNGROUPED_FUNCTIONS`. An ungrouped function is granted only by `fun:all` and by its own `fun:<name>` token. Both lists use canonical names: an alias needs no entry, because it is gated as its canonical function.

A built-in missing from the table escapes the entitlement check: every key that lets formulas evaluate can call it, including a key that grants no functions. The completeness check in the private test suite (`unit/license/capability-registry.spec.ts`) fails on such a function, but the public smoke tests do not.

Group names are part of the license key format, so never rename a group or remove a function from one. Adding a function to a group grants it to every key that already carries that group's token.

## Internationalization and function translations

HyperFormula supports internationalization and provides localized function names for all built-in languages. Translation files live in `src/i18n/languages/`. New functions must include translations for all built-in languages.
Expand Down
7 changes: 7 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ coverage:
round: down
precision: 2

# src/license/handsontable-license-key-parser/ is a byte-identical copy of handsontable/license-key's
# vendor/entitlement-key-reader (see PROVENANCE.md there). Upstream tests it; HyperFormula only calls
# part of it and may not edit it, so its coverage says nothing about this repository. It is left in the
# local jest report on purpose - only the codecov statuses ignore it.
ignore:
- "src/license/handsontable-license-key-parser/**"

comment:
layout: "reach, diff, flags, files"
behavior: new
Expand Down
2 changes: 1 addition & 1 deletion docs/api-ref-readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ For example, subscribing to `sheetAdded` event:
const hfInstance = HyperFormula.buildFromSheets({
MySheet1: [ ['1'] ],
MySheet2: [ ['10'] ],
});
}, { licenseKey: 'gpl-v3' });

const handler = ( ) => { console.log('baz') }

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/ai-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const hf = HyperFormula.buildFromArray([
['Revenue', 100],
['Cost', 60],
['Profit', '=B1-B2'],
]);
], { licenseKey: 'gpl-v3' });

// Pass the spreadsheet tools straight into generateText.
const result = await generateText({
Expand Down
4 changes: 2 additions & 2 deletions docs/guide/basic-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ easily check if that action is allowed, and if it is not, throw an error.
// an instance with some example data
const hfInstance = HyperFormula.buildFromArray([
['1', '2'],
]);
], { licenseKey: 'gpl-v3' });

// a variable used to carry the message for the user
let messageUsedInUI;
Expand Down Expand Up @@ -395,7 +395,7 @@ const hf = HyperFormula.buildFromArray([
[1],
['=SUM(A1:A2)'],
['=COUNTBLANK(A1:A3)'],
]);
], { licenseKey: 'gpl-v3' });

// insert an empty row between the row 0 and the row 1
const changes = hf.addRows(0, [1, 1]);
Expand Down
6 changes: 3 additions & 3 deletions docs/guide/batch-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ operation together with their absolute addresses and new values.
const hfInstance = HyperFormula.buildFromSheets({
MySheet1: [ ['1'] ],
MySheet2: [ ['10'] ],
});
}, { licenseKey: 'gpl-v3' });

// multiple operations in a single callback will trigger evaluation only once
// and only one set of changes will be returned as a combined result of all
Expand Down Expand Up @@ -58,7 +58,7 @@ operation together with their absolute addresses and new values.
const hfInstance = HyperFormula.buildFromSheets({
MySheet1: [ ['1'] ],
MySheet2: [ ['10'] ],
});
}, { licenseKey: 'gpl-v3' });

// suspend the evaluation
hfInstance.suspendEvaluation();
Expand All @@ -82,7 +82,7 @@ When you need to check if the evaluation is suspended you can
call the [`isEvaluationSuspended`](../api/classes/hyperformula.md#isevaluationsuspended) method.

```javascript
const hfInstance = HyperFormula.buildEmpty();
const hfInstance = HyperFormula.buildEmpty({ licenseKey: 'gpl-v3' });

// suspend the evaluation
hfInstance.suspendEvaluation();
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/cell-references.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ This example shows the change after the move operation was done:
// build with a simple dataset
const hfInstance = HyperFormula.buildFromArray([
['=B2', '=A1', ''],
]);
], { licenseKey: 'gpl-v3' });

// these are the coordinates for a move operation
const source = { sheet: 0, col: 1, row: 0 };
Expand Down
6 changes: 3 additions & 3 deletions docs/guide/clipboard-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ To copy the contents of a cell or range, use the [`copy()`](../api/classes/hyper
```javascript
const hfInstance = HyperFormula.buildFromArray([
['1', '2'],
]);
], { licenseKey: 'gpl-v3' });

// copy [ [ 2 ] ]
const clipboardContent = hfInstance.copy({
Expand All @@ -40,7 +40,7 @@ Any CRUD operation called after the [`cut()`](../api/classes/hyperformula.md#cut
```javascript
const hfInstance = HyperFormula.buildFromArray([
['1', '2'],
]);
], { licenseKey: 'gpl-v3' });

// returns the values that were cut: [ [ 1 ] ]
const clipboardContent = hfInstance.cut({
Expand All @@ -58,7 +58,7 @@ To paste the contents of a cell or range, use the [`paste()`](../api/classes/hyp
```javascript
const hfInstance = HyperFormula.buildFromArray([
['1', '2'],
]);
], { licenseKey: 'gpl-v3' });

// [ [ 2 ] ] was copied
const clipboardContent = hfInstance.copy({
Expand Down
1 change: 1 addition & 0 deletions docs/guide/compatibility-with-google-sheets.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ This configuration aligns HyperFormula with the default behavior of Google Sheet
```js
// define options
const options = {
licenseKey: 'gpl-v3',
dateFormats: ['MM/DD/YYYY', 'MM/DD/YY', 'YYYY/MM/DD'],
timeFormats: ['hh:mm', 'hh:mm:ss.sss'], // set by default
currencySymbol: ['$', 'USD'],
Expand Down
1 change: 1 addition & 0 deletions docs/guide/compatibility-with-microsoft-excel.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ This configuration aligns HyperFormula with the default behavior of Microsoft Ex
```js
// define options
const options = {
licenseKey: 'gpl-v3',
dateFormats: ['MM/DD/YYYY', 'MM/DD/YY', 'YYYY/MM/DD'],
timeFormats: ['hh:mm', 'hh:mm:ss.sss'], // set by default
currencySymbol: ['$', 'USD'],
Expand Down
8 changes: 4 additions & 4 deletions docs/guide/currency-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ By default, HyperFormula recognizes `$` as a currency symbol in cell input. To a
```javascript
const hf = HyperFormula.buildFromArray(
[['100 zł', '=A1 * 1.23']],
{ currencySymbol: ['$', 'zł'] }
{ licenseKey: 'gpl-v3', currencySymbol: ['$', 'zł'] }
);

console.log(hf.getCellValue({ sheet: 0, col: 0, row: 0 })); // 100
Expand Down Expand Up @@ -53,7 +53,7 @@ With no `stringifyCurrency` configured, the built-in formatter handles simple `$
const hf = HyperFormula.buildFromArray([
[1234.5, '=TEXT(A1, "$0.00")'],
[1234.5, '=TEXT(A2, "$#.00")'],
]);
], { licenseKey: 'gpl-v3' });

console.log(hf.getCellValue({ sheet: 0, col: 1, row: 0 })); // "$1234.50"
console.log(hf.getCellValue({ sheet: 0, col: 1, row: 1 })); // "$1234.50"
Expand All @@ -62,7 +62,7 @@ console.log(hf.getCellValue({ sheet: 0, col: 1, row: 1 })); // "$1234.50"
A non-`$` symbol used purely as a suffix (no thousands grouping, no decimal-comma) also passes through unchanged:

```javascript
const hf = HyperFormula.buildFromArray([[1234.5, '=TEXT(A1, "0.00 zł")']]);
const hf = HyperFormula.buildFromArray([[1234.5, '=TEXT(A1, "0.00 zł")']], { licenseKey: 'gpl-v3' });
console.log(hf.getCellValue({ sheet: 0, col: 1, row: 0 })); // "1234.50 zł"
```

Expand Down Expand Up @@ -92,7 +92,7 @@ const stringifyCurrency = (value, fmt) =>

const hf = HyperFormula.buildFromArray([
[1234.5, '=TEXT(A1, "$#,##0.00")'],
], { stringifyCurrency });
], { licenseKey: 'gpl-v3', stringifyCurrency });

console.log(hf.getCellValue({ sheet: 0, col: 1, row: 0 })); // "$1234.50"
```
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/custom-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Now, you're ready to use your GREET function in a formula.

```js
// build a HyperFormula instance where you can use your function directly
const hfInstance = HyperFormula.buildFromArray([['Anthony', '=GREET(A1)']]);
const hfInstance = HyperFormula.buildFromArray([['Anthony', '=GREET(A1)']], { licenseKey: 'gpl-v3' });

// read the value of cell B1
const result = hfInstance.getCellValue({ sheet: 0, col: 1, row: 0 });
Expand Down
4 changes: 2 additions & 2 deletions docs/guide/dependency-graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ node and avoid duplicating the work during computation.
To get the immediate precedents of a cell or a range (the in-neighbors of the cell node or the range node), use the [`getCellPrecedents()`](../api/classes/hyperformula.html#getcellprecedents) method:

```js
const hfInstance = HyperFormula.buildFromArray([[ '1', '2', '=A1', '=B1+C1' ]]);
const hfInstance = HyperFormula.buildFromArray([[ '1', '2', '=A1', '=B1+C1' ]], { licenseKey: 'gpl-v3' });

hfInstance.getCellPrecedents({ sheet: 0, col: 3, row: 0 });
// returns [{ sheet: 0, col: 1, row: 0 }, { sheet: 0, col: 2, row: 0 }]
Expand All @@ -98,7 +98,7 @@ hfInstance.getCellPrecedents({ sheet: 0, col: 3, row: 0 });
To get the immediate dependents of a cell or a range (the out-neighbors of the cell node or the range node), use the [`getCellDependents()`](../api/classes/hyperformula.html#getcelldependents) method:

```js
const hfInstance = HyperFormula.buildFromArray([[ '1', '=A1', '=A1+B1', '=B1+C1' ]])
const hfInstance = HyperFormula.buildFromArray([[ '1', '=A1', '=A1+B1', '=B1+C1' ]], { licenseKey: 'gpl-v3' })

hfInstance.getCellDependents({ sheet: 0, col: 0, row: 0 })
// returns [{ sheet: 0, col: 1, row: 0 }, { sheet: 0, col: 2, row: 0 }]
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/integration-with-langchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const hf = HyperFormula.buildFromArray([
['Revenue', 100],
['Cost', 60],
['Profit', '=B1-B2'],
]);
], { licenseKey: 'gpl-v3' });

const agent = createReactAgent({
llm: new ChatOpenAI({ model: 'gpt-4o' }),
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/known-limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,6 @@ HyperFormula resolves the OFFSET function at parse time rather than during evalu
* OFFSET is resolved at parse time, so `getCellFormula` returns the computed reference, not the original `OFFSET` call.

```js
const hf = HyperFormula.buildFromArray([[1, 45, '=OFFSET(A1, 0, 1)']]);
const hf = HyperFormula.buildFromArray([[1, 45, '=OFFSET(A1, 0, 1)']], { licenseKey: 'gpl-v3' });
hf.getCellFormula({ sheet: 0, row: 0, col: 2 }); // '=B1'
```
Loading
Loading