HyperFormula 2.3.1: Better experience with named expressions
We’ve just released HyperFormula 2.3.1. This version brings a few anticipated bug fixes, updates the documentation, and improves the experience of using named expressions.
Named expressions: Straightforward naming rules
A named expression is a piece of data (e.g., a formula) that’s given a custom, user-friendly name. You can then refer to the expression by its name instead of retyping the entire formula each time you want to use it in a cell. This makes complex calculations more manageable and easier to understand.
Before, finding correct names for your expressions could be tricky, as certain character combinations resulted in validation errors, while some others weren’t documented yet. To solve this, HyperFormula 2.3.1 sets clear, easy-to-follow rules around naming your expressions.
For example, now you can come up with names that start with cell addresses, such as C1_CA
or
:C2_TX
hf.addNamedExpression("C1_CA", "=SUMIF(main!$A$1:main!$A$5, "*CA", main!$B$1:main!$B$5)"); hf.addNamedExpression("C2_TX", "=SUMIF(main!$A$1:main!$A$5, "*TX", main!$C$1:main!$C$5)");
And they’ll just work:
For more information, see the Naming rules section in HyperFormula’s documentation.
Named expressions: Better compatibility with Excel and Google Sheets
To further improve your experience with named expressions, we aligned HyperFormula’s naming rules with those of Microsoft Excel and Google Sheets as closely as possible. We fixed certain name validation issues, and made sure that the remaining differences give you more rather than less flexibility around naming your expressions.
For details, see this pull request. And if you’re interested in better compatibility with Excel or Google Sheets, see the two dedicated guides in HyperFormula’s documentation:
Bug fixes
Removing a sheet (removeSheet()
) without clearing it (clearSheet()
) doesn’t throw an error anymore. Also, using reversed ranges with absolute addressing no longer causes problems in certain configurations.
Documentation updates
Apart from updating the documentation about naming expressions, we added more details on date and time formats supported by some of HyperFormula’s functions. We also further improved the documentation related to custom functions by adding more information on argument types, the runFunction()
method, and the SimpleRangeValue
class.
Release notes
What we fixed
- Fixed an issue where expression names were not allowed to start with a cell reference. #1058
- Fixed an issue where expression names were allowed to start with R1C1-notation references. For better compatibility with other spreadsheet software, strings such as
R4C5
,RC1000
,R1C
orRC
can’t be used in expression names anymore. #1058 - Fixed an issue where using reversed ranges with absolute addressing could cause the
Incorrect array size
error. #1106 - Fixed an issue where removing a sheet (
removeSheet()
) without clearing it (clearSheet()
) could cause an error. #1121