HyperFormula 2.7.0: New functions and mortgage calculator demo

Beata Mówka HyperFormula / April 10, 2024

HyperFormula 2.7.0: New functions and mortgage calculator demo

We’ve just put the finishing touches on HyperFormula 2.7.0, which introduces two community-requested additions: the context configuration option and the getNamedExpressionsFromFormula method, improving your experience of using named expressions. Moreover, you can now explore our latest demo, simulating a mortgage calculator. 

For a detailed overview of all the changes in this release, see the release notes page in HyperFormula’s documentation.

Added getNamedExpressionsFromFormula method

In response to your requests, we’ve introduced a new helper method, getNamedExpressionsFromFormula, created to access all variables present in a formula.

So, what does this method do exactly? Imagine your application puts additional constraints on the set of named expressions that could be used inside each formula. To verify the validity of a user-entered formula, you need to extract all named expressions from it. 

Previously, accomplishing this task would require implementing a complete formula parser. However, with the getNamedExpressionsFromFormula method now available, parsing formulas and retrieving named expressions becomes straightforward. Simply pass a formula string as input.

For more information, see this section in HyperFormula’s documentation.

Added context configuration option

Initially requested in #808, this new addition allows you to pass any data to custom function implementations via the context option, making it ideal for advanced multi-instance scenarios like creating a custom function that returns the column header from storage outside HyperFormula. Whether it’s configuration settings or dynamic parameters, this option provides you with flexibility. Now, you can easily store and access custom data within the scope of your function implementations.

Thank you, Michael Bridge, for your contribution!

New HyperFormula demo application: mortgage calculator

In addition to these community-driven improvements, we’re excited to introduce a new HyperFormula example application: a mortgage calculator. This new tool demonstrates the versatility and power of our headless spreadsheet in real-world scenarios.

You can read more about this version on GitHub or dive into the HyperFormula’s documentation.