Formula.js

JavaScript implementation of most formula functions supported by Microsoft Excel 2013 and Google Spreadsheets

NOTE: some external libraries required

Formula

Result

{{ $eval(myFormula.substring(1)) }}

Overview

StatusUnder development (first release scheduled for February, 2013)
PurposeProvide a JavaScript implementation of most formula functions supported by Microsoft Excel 2013 and Google Spreadsheets
OriginExpression Engine developed for the STOIC platform
CoverageA handful of unsupported functions are left deliberatly out of scope, and a few others are in need of a suitable implementation
DependenciesjStat, Lo-Dash, Moment.js, Numeral.js, Numeric JavaScript, Undercore.string (RequireJS package under development)
DeploymentClient-side and server-side (NPM package under development)
AuthorIsmael Chang Ghalimi for STOIC, with help from a few contributors
LicenseMIT License

Function types

TypeStatusReference
Compatibility functionsPlannedExcel
Database functionsPlannedExcel
Date and time functionsImplementedExcel
Engineering functionsImplementedExcel
Financial functionsStartedExcel
Information functionsPlannedExcel
Logical functionsImplementedExcel
Lookup and reference functionsPlannedExcel
Math and trigonometry functionsImplementedExcel
Statistical functionsImplementedExcel
Text functionsImplementedExcel
User defined functionsPlannedExcel
Web functionsPlannedExcel

{{ PROPER(type.type) }}

Function Test Result Pass
{{ test.function }} {{ test.call }} {{ $eval(test.call) }}

Notes

Functions follow Microsoft Excel's type classification (vs Google).
Parameter names have been harmonized and simplified (they only affect documentation).
Periods in function names have been removed (CEILINGPRECISE vs CEILING.PRECISE).
Whenever matching functions in Microsoft Excel and Google Spreadsheets disagree, Microsoft Excel has precedence (larger user base).
Microsoft Excel's Cube functions are not supported.

Unsupported functions

FunctionPlatformReasonPlanned
{{ function.name }} {{ function.platform }} {{ function.reason }} {{ PLANNED(function.planned) }}

Required libraries

LibraryPurpose
{{ library.name }} {{ library.purpose }}

Credits

Formula.js is 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.

License

The MIT License (MIT)

Copyright © 2012 Sutoiku, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.