Socket
Socket
Sign inDemoInstall

hyperformula

Package Overview
Dependencies
3
Maintainers
6
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    hyperformula

HyperFormula is a JavaScript engine for efficient processing of spreadsheet-like data and formulas


Version published
Weekly downloads
73K
decreased by-7.49%
Maintainers
6
Install size
11.1 MB
Created
Weekly downloads
 

Changelog

Source

[2.7.0] - 2024-04-10

Added

  • Added method getNamedExpressionsFromFormula to extract named expressions from formulas. #1365
  • Added context config option for passing data to custom functions. #1396

Readme

Source

HyperFormula - A headless spreadsheet, a parser and evaluator of Excel formulas

An open-source headless spreadsheet for business web apps

npm total downloads npm monthly downloads GitHub contributors Known Vulnerabilities
FOSSA Status GitHub Workflow Status codecov


HyperFormula is a headless spreadsheet built in TypeScript, serving as both a parser and evaluator of spreadsheet formulas. It can be integrated into your browser or utilized as a service with Node.js as your back-end technology.

What HyperFormula can be used for?

HyperFormula doesn't assume any existing user interface, making it a general-purpose library that can be used in various business applications. Here are some examples:

  • Custom spreadsheet-like app
  • Business logic builder
  • Forms and form builder
  • Educational app
  • Online calculator

Features

Documentation

Integrations

Installation and usage

Install the library from npm like so:

npm install hyperformula

Once installed, you can use it to develop applications tailored to your specific business needs. Here, we've used it to craft a form that calculates mortgage payments using the PMT formula.

import { HyperFormula } from 'hyperformula';

// Create a HyperFormula instance
const hf = HyperFormula.buildEmpty({ licenseKey: 'gpl-v3' });

// Add an empty sheet
const sheetName = hf.addSheet('Mortgage Calculator');
const sheetId = hf.getSheetId(sheetName);

// Enter the mortgage parameters
hf.addNamedExpression('AnnualInterestRate', '8%');
hf.addNamedExpression('NumberOfMonths', 360);
hf.addNamedExpression('LoanAmount', 800000);

// Use the PMT function to calculate the monthly payment
hf.setCellContents({ sheet: sheetId, row: 0, col: 0 }, [['Monthly Payment', '=PMT(AnnualInterestRate/12, NumberOfMonths, -LoanAmount)']]);

// Display the result
console.log(`${hf.getCellValue({ sheet: sheetId, row: 0, col: 0 })}: ${hf.getCellValue({ sheet: sheetId, row: 0, col: 1 })}`);

Run this code in CodeSandbox

Contributing

Contributions are welcome, but before you make them, please read the Contributing Guide and accept the Contributor License Agreement.

License

HyperFormula is available under two different licenses: GPLv3 and commercial. The commercial license can be purchased by contacting our team at Handsontable.

Copyright (c) Handsoncode

Keywords

FAQs

Last updated on 10 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc