Skip to content

HyperFormula 1.0.0 has landed #769

Closed

Description

@AMBudnik

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 SimpleCellRange type notation to the A1:A2 notation, and vice versa, with the new simpleCellRangeFromString and simpleCellRangeToString helpers.
  • Consistently use all sheet-related methods with sheetId, rather than sheetName

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 FILTER function
  • Constrain arrays' sizes, with the new ARRAY_CONSTRAIN function

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 sheetId instead of sheetName
    To make sheet-related methods more consistent, we updated many of them to take sheetId instead of sheetName as 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: matrixDetection and matrixDetectionThreshold.
    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
  • SimpleCellRange type argument
    We updated some methods to take the new SimpleCellRange type 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 the setCellContents, addRows, removeRows, addColumns, and removeColumns methods. 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 sheetId instead of sheetName as 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 matrixDetection and matrixDetectionThreshold configuration options. (Simplify Matrices #669)
  • Breaking change: Changed the following methods' APIs to take the SimpleCellRange type argument (API fix #687):
    • copy
    • cut
    • getCellDependents
    • getCellPrecedents
    • getFillRangeData
    • getRangeFormulas
    • getRangeSerialized
    • getRangeValues
    • isItPossibleToMoveCells
    • isItPossibleToSetCellContents
    • moveCells
  • Breaking change: Changed the AGPLv3 license to GPLv3.
  • Breaking change: Removed the free non-commercial license.
  • Breaking change: Changed the behavior of the setCellContents method, 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 addRows and removeRows methods, 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 addColumns and removeColumns methods, 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.MATRIX to CellType.ARRAY (Pu/matrixarray #747)
  • Breaking change: Changed the following configuration options (Pu/matrixarray #747):
Before After
matrixColumnSeparator arrayColumnSeparatorp
matrixRowSeparator arrayRowSeparator
Before After
matrixMapping arrayMapping
isCellPartOfMatrix isCellPartOfArray
Before After
SourceLocationHasMatrixError SourceLocationHasArrayError
TargetLocationHasMatrixError TargetLocationHasArrayError

Release notes: what we added

Release notes: what we fixed

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.
acknowledgments

Activity

  1. pinned this issue on Jul 15, 2021
  2. added
    Verified
    on Jul 15, 2021
  3. unpinned this issue on Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Verified

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions