Repository navigation
Description
We just rolled out HyperFormula 1.0.0: a JavaScript, headless calculation engine with spreadsheet-like notation, developed by the same team that's responsible for Handsontable.
Initially planning it as a plugin for Handsontable, we soon realized that what we were developing presented many more possibilities, and we shifted to launching it as a new tool, totally independent of Handsontable.
HyperFormula makes it easier to integrate complex calculation capabilities into your web app without imposing UI limits or restrictions, allowing for faster development of business web apps.
Within our last milestone before the 1.0.0 version, we added array formulas. It's been a truly great finish of the 3-year-long adventure.
What's new in 1.0.0
Since version 0.6.0, we have fixed some bugs and added new features. Now, you can:
- Operate on arrays of values, and pass arrays to scalar functions
- Quickly convert ranges from the
SimpleCellRangetype notation to theA1:A2notation, and vice versa, with the newsimpleCellRangeFromStringandsimpleCellRangeToStringhelpers. - Consistently use all sheet-related methods with
sheetId, rather thansheetName
New array features
To let you operate on arrays of values, similarly to Google Sheets and Microsoft Excel, we've introduced a new array arithmetic mode. This means that now you can:
- Perform arithmetic operations on arrays, just like on single values
- Pass arrays to functions that would normally accept single values
- Filter arrays, with the new
FILTERfunction - Constrain arrays' sizes, with the new
ARRAY_CONSTRAINfunction
You can either enable the array arithmetic mode locally with the new ARRAYFORMULA function, or enable it globally with the new useArrayArithmetic configuration option.
Read more about arrays in the HyperFormula documentation.
Because of the array formula changes, we removed the matrix formula notation ({=FORMULA}), removed numerical matrix detection, and changed the naming of some array-related methods, exceptions, and configuration options. For details, see this migration guide and the Breaking changes section below.
Breaking changes
Some of the changes we made modify the way you interact with HyperFormula, so there's a chance you'll need to change your application's code.
To successfully upgrade from version 0.6.x to 1.0.0, see this migration guide.
- License changes
We changed the AGPLv3 license to GPLv3, and removed the "free for non-commercial" license. - Some methods now take
sheetIdinstead ofsheetName
To make sheet-related methods more consistent, we updated many of them to takesheetIdinstead ofsheetNameas an argument. For a detailed list of affected methods, read this GitHub issue. - Deprecated matrix formula notation
Now that HyperFormula supports array formulas, we removed support for the matrix formula notation. If you're using the{=FORMULA}notation, you'll need to switch to the new array formulas. - Deprecated numerical matrix detection
To improve and simplify HyperFormula matrices, we removed numerical matrix detection. We also removed the related configuration options:matrixDetectionandmatrixDetectionThreshold.
matrix ⟶ array changes.
To unify the naming of array-related methods, exceptions, and configuration options, we changed the following:
| Before | After |
|---|---|
CellType.MATRIX |
CellType.ARRAY |
matrixColumnSeparator |
arrayColumnSeparator |
matrixRowSeparator |
arrayRowSeparator |
matrixMapping |
arrrayMapping |
isCellPartOfMatrix |
isCellPartOfArray |
SourceLocationHasMatrixError |
SourceLocationHasArrayError |
TargetLocationHasMatrixError |
TargetLocationHasArrayError |
SimpleCellRangetype argument
We updated some methods to take the newSimpleCellRangetype argument. For a detailed list of affected methods, see the Release notes: what we changed section below.- Array changes
To let you perform CRUD operations with the new array formulas, we changed the behavior of thesetCellContents,addRows,removeRows,addColumns, andremoveColumnsmethods. For details, see the Release notes: what we changed section below.
Release notes: what we changed
- Breaking change: Changed the APIs of many sheet-related methods to take
sheetIdinstead ofsheetNameas arguments. (We should use sheetId consistently across our public APIs #645) - Breaking change: Removed support for the matrix formula notation
({=FORMULA}), as HyperFormula now supports formulas returning arrays of values. (refactor of matrices #652) - Breaking change: Removed numerical matrix detection, along with the
matrixDetectionandmatrixDetectionThresholdconfiguration options. (Simplify Matrices #669) - Breaking change: Changed the following methods' APIs to take the
SimpleCellRangetype argument (API fix #687):copycutgetCellDependentsgetCellPrecedentsgetFillRangeDatagetRangeFormulasgetRangeSerializedgetRangeValuesisItPossibleToMoveCellsisItPossibleToSetCellContentsmoveCells
- Breaking change: Changed the AGPLv3 license to GPLv3.
- Breaking change: Removed the free non-commercial license.
- Breaking change: Changed the behavior of the
setCellContentsmethod, so that it's possible to override space occupied by spilled arrays. (Array CRUDs improvements (part #1) #708) - Breaking change: Changed the behavior of the
addRowsandremoveRowsmethods, so that it's possible to add or remove rows across a spilled array, without changing the array size. (Array CRUDs improvements (part #1) #708) - Breaking change: Changed the behavior of the
addColumnsandremoveColumnsmethods, so that it's possible to add or remove columns across a spilled array, without changing the array size. (Array CRUDs improvements (part #2) #732) - Breaking change: Changed
CellType.MATRIXtoCellType.ARRAY(Pu/matrixarray #747) - Breaking change: Changed the following configuration options (Pu/matrixarray #747):
| Before | After |
|---|---|
matrixColumnSeparator |
arrayColumnSeparatorp |
matrixRowSeparator |
arrayRowSeparator |
- Breaking change: Changed the following API methods (Pu/matrixarray #747):
| Before | After |
|---|---|
matrixMapping |
arrayMapping |
isCellPartOfMatrix |
isCellPartOfArray |
- Breaking change: Changed the following exceptions (Pu/matrixarray #747):
| Before | After |
|---|---|
SourceLocationHasMatrixError |
SourceLocationHasArrayError |
TargetLocationHasMatrixError |
TargetLocationHasArrayError |
- Changed the
SWITCHfunction, so that it takes an array as its first argument. - Changed the
TRANSPOSEfunction, so that it works with data of any type. (Array CRUDs improvements (part #1) #708) - Changed the way gpu.js is included, making it even more optional (Remove GPU.js import #753)
Release notes: what we added
- Added support for array arithmetic. (arrays arithmetic #628)
- Added performance improvements for array handling. (performance improvements for arrays #629)
- Added the
ARRAYFORMULAfunction. (ARRAYFORMULA #630) - Added the
FILTERfunction. (Pu/filter #668) - Added the
ARRAY_CONSTRAINfunction. (array_constrain function added #661) - Added casting to scalars from non-range arrays. (Pu/casttoscalar #663)
- Added support for range interpolation. (range interpolation #665)
- Added parsing of arrays in formulas (together with respective configuration options for separators). (Pu/matrixinput #671)
- Added support for the vectorization of scalar functions. (Pu/vectorization #673)
- Added support for time in JavaScript
Date()objects on the input. (Date() object full support #648) - Added validation of API argument types for simple types. (getSheetId fails with an error when called without an argument. #654)
- Added named expression handling to engine factories. (some fixes to namedexpressions #680)
- Added the
getAllNamedExpressionsSerializedmethod. (some fixes to namedexpressions #680) - Added a utility function for filling a range with source from another range. (utility function #678)
- Added pretty-print for
detailedCellError. (Pu/detailedcellerror #712) - Added the
simpleCellRangeFromStringandsimpleCellRangeToStringhelpers. (range converters helpers #720) - Added
CellErrorto exports. (Pu/exports #736) - Added mapping policies to the exports (Pu/matrixarray #747):
AlwaysDenseAlwaysSparseDenseSparseChooseBasedOnThreshold
- Added the
#SPILL!error type. (Array CRUDs improvements (part #1) #708) - Added large tests for CRUD interactions. (Pu/large tests #755)
Release notes: what we fixed
- Fixed an issue with arrays and CRUD operations. (setCellContent + Matrices #651)
- Fixed the handling of arrays for the
ROWSandCOLUMNSfunctions. (rows/columns fixed to work with arrays #677) - Fixed an issue with nested named expressions. (fix #679)
- Fixed an issue with
matrixDetectionand number parsing. (Percent/Currency value types are incorrect #686) - Fixed an issue with the
NOWandTODAYfunctions. (TODAY and NOW formulas return wrong value #709) - Fixed an issue with the
MINandMAXfunction caches. (Pu/minmax #711) - Fixed an issue with caching and the order of evaluation. (fixed bug with order of evaluation and caching #735)
Acknowledgments
The HyperFormula project was co-financed from European Union funds under the European Regional Development Funds as a part of the Smart Growth Operational Programme. Project implemented as a part of the National Centre for Research and Development: Fast Track.

Activity