Coder Social home page Coder Social logo

tigerandgirl / formulajs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from formulajs/formulajs

0.0 0.0 0.0 2.46 MB

JavaScript implementation of most Microsoft Excel formula functions

Home Page: https://formulajs.info/

License: Other

Makefile 0.23% JavaScript 99.61% HTML 0.16%

formulajs's Introduction

Formula.js Build Status

Official website and documentation is here

Use it

In browser

Powered by jsDelivr, you can use the latest version of Formula.js:

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jstat.min.js"></script> 
<script src="https://cdn.jsdelivr.net/gh/formulajs/[email protected]/dist/formula.min.js"></script>

Then the functions can be accessed as

formulajs.Date(2008, 7, 8)
formulajs.SUM([1, 2 , 3])
...

In node

Install the package:

npm i @formulajs/formulajs

Differences between Excel functions and Formula.js

Date

The functions DATE, DATEVALUE, EDATE, EOMONT, NOW, TODAYreturn plain JS Date instead of the serial Excel number.

Copying composite formula directly from Excel into JS will not work out of the box:

= DATE(2020,5,9) - DATE(2020,5,8) // Formula.js: 86400000 / Excel: 1

It is not recommended to use DATEVALUE to parse string representing a date. Formula.js uses new Date('YOUR STRING') under the hood. There are better libraries to do this job (for example Moment.js)

Migration guide

From Formula.js

If you were previously using formulajs from Sutoiku, some functions have been removed, due to dependency simplification.

Text functions:

FIXED, TEXT, DOLLAR, VALUE

Math functions:

MDETERM, MINVERSE, MMULT, MUNIT

Otherwise the 2 packages are fully compatible. You can swap them.

From @handsontable/formulajs

The code of this package is originally forked from @handsontable/formulajs version 2.0.2 (released in January 2020). The two packages were identical at the time. There is no regression, only fixes and new functions since the fork.

Historic

This project is forked from handsontable/formula.js and it's developed for everyone needs.

Original Formula.js project was developed and maintained by Ismael Chang Ghalimi, with support from STOIC and help from the following contributors: Ilmari Karonen, Sébastien Loisel, Trevor Norris, Roönaän, Hannes Stiebitzhofer.

It was then forked and extended by the handsontable/formula.js mainly contributed by @budnix.

Contributions and road map 2020

The road map in the coming month is to gather the improvements made in the main forks of the original project. If you forked and made changes to sutoiku/formula.js do not hesitate to propose a pull request with your changes.

To avoid any regression or miss calculation please provide unit tests as long as function improvements.

formulajs's People

Contributors

joaojeronimo avatar jalateras avatar miguelvps avatar budnix avatar nicolashefti avatar 0x333333 avatar ghalimi avatar mrpiotr-dev avatar hmalphettes avatar kikuchiyo avatar petermoresi avatar nikazooz avatar danielchatfield avatar chilarai avatar greyarch avatar jansiegel avatar joelcogen avatar luc-freyermuth avatar swistach avatar bornova avatar vudknguyen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.