Code Monkey home page Code Monkey logo

adammendoza / excelformulautilitiesjs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joshbtn/excelformulautilitiesjs

0.0 1.0 0.0 27.4 MB

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# and python.

Home Page: http://excelformulabeautifier.com/

License: Other

JavaScript 89.27% CSS 4.00% HTML 6.56% CoffeeScript 0.17%

excelformulautilitiesjs's Introduction

Excel Formula Utilities for JavaScript

Excel Formula Utilities for JavaScript is a library that can be used to pretty print excel formulas or convert excel formulas into JavaScript. The JavaScript generated by this library will not execute on it's own. You'll need to include something like formula.js to cover all the functions from Excel.

##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.formatFormulaHTML('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]) // This will work fine in a pre tag
    excelFormulaUtilities.formatFormulaHTML(formula) // Use this if you want the output as html.
    excelFormulaUtilities.formula2JavaScript(formula)
    excelFormulaUtilities.formula2CSharp(formula)

excelformulautilitiesjs's People

Contributors

joshbtn avatar adamschmideg avatar jordanyaker avatar brainysmurf avatar daniel15 avatar darrinholst avatar fransoic avatar extend1994 avatar imheresamir avatar dreina-toast avatar manihew avatar

Watchers

James Cloos 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.