Skip to content

Based on ewbi's go calc excel formula parser http://ewbi.blogs.com/develops/popular/excelformulaparsing.html. This library contains methods to beautify an excel formula. This library also contains functions to convert an excel formula to JavaScript (ECMAScript) or C#.

License

Notifications You must be signed in to change notification settings

modulexcite/excelFormulaUtilitiesJS

 
 

Repository files navigation

Excel Formula Utilities for JavaScript

master build status Build Status

ExcelFormulaBeautifier.com

To submit pull requests for ExcelFormulaBeautifier.com please oppen a pull request after gh-pages branch. To submit pull requests for ExcelFormulaBeautifier.com please use this branch. Changes to the core js library live in the master branch.

##Install using npm npm install excel-formula

Installation for web

Grab the latest js files in the dist folder.

Basic usage for web

<script src="excel-formula.js" />
<script>
    var formattedFormula = excelFormulaUtilities.formatFormula('IF(1+1=2,"true","false")');
    alert(formattedFormula)
</script>

Basic Usage for Node

var formula = require('excel-formula');
var formattedFormula = formula.formatFormula('IF(1+1=2,"true","false")');
console.log(formatFormula);

Node methods

See basic usage above.

formula.getTokens (formula);
formula.formatFormula (formula, [opts])
formula.toJavaScript(formula)
formula.toCSharp(formula)

Web methods

excelFormulaUtilities is a global variable.

excelFormulaUtilities.getTokens (formula);
excelFormulaUtilities.formatFormula (formula, [opts])
excelFormulaUtilities.formula2JavaScript(formula)
excelFormulaUtilities.formula2CSharp(formula)

About

Based on ewbi's go calc excel formula parser http://ewbi.blogs.com/develops/popular/excelformulaparsing.html. This library contains methods to beautify an excel formula. This library also contains functions to convert an excel formula to JavaScript (ECMAScript) or C#.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 90.9%
  • HTML 4.9%
  • CSS 3.2%
  • CoffeeScript 1.0%