Basic usage | HyperFormula (v3.2.0)

TIP

The instance can be created with three static methods: buildFromArray, buildFromSheets or buildEmpty. You can check all of their descriptions in our API reference.

If you've already installed the library, it's time to start writing the first simple application.

First, if you used NPM or Yarn to install the package, make sure you have properly imported HyperFormula as shown below:

If you embed HyperFormula in the <script> tag using CDN, then it will be accessible as global variable HyperFormula and ready to use.

Now you can use the available options to configure the instance of HyperFormula according to your needs, like this:

Then, prepare some data to be used by your app. In this case, the data set will contain numbers and just one formula =SUM(A1,B1). Use the buildFromArray method to create the instance:

Alright, now it's time to do some calculations. Let's use the getCellValue method to retrieve the results of a formula included in the data .

You can check the output in the console:

That's it! You've grasped a basic idea of how the HyperFormula engine works. It's time to move on to a more advanced example.

# Demo