Giter Site home page Giter Site logo

eft's Introduction

Excel formula transpiler

A little tool I glued together after getting frustrated with excel. Allows writing excel formulas with if-elseif-else blocks and operators that for some reason where not included in excel's grammar (like && or ||). As output it spits out standard excel formulas (hence 'transpiler'). As a bonus the tool translates function names to the target language and allows setting decimal point and list separator characters (which is always a gaint pain in the ass if your native language is not English).

Oh, and the editor uses the awesome ACE editor with a custom syntax highlighter to make life easier.

If-blocks

  • if expression then expression
  • if expression then expression else expression
  • if expression then expression elseif expression then [...]

If-blocks can be enclosed in braces like any other expressions

Constants

  • normal numbers: 1234.12
  • scientific numbers: 12e12
  • hexadecimal numbers: 0x1234
  • binary numbers: 0b10101
  • strings: "yo!" (supported escape sequences \\, \", \n, \r, \t, \xhh and \uhhhh)
  • boolean values: true and false

Decimal point has to be a dot, but output decimal point can be set to any character

Cell addresses

  • normal: c1, c$1, $c$1
  • range: c1:c2
  • external: [foo]bar!c4

Functions

  • English names trim(c1)
  • Chosen language names usuń.zbędne.odstępy(c1)

Arguments have to be separated with a comma, but the output list separator can be set to any character. English names get translated when necessary.

Comments

Standard line commnents // and block comments /* */ are supported.

Added or changed operators

  • logical or: ||
  • logical and: &&
  • equal: ==
  • not equal: !=
  • shift left: <<
  • shift right: >>
  • modulo: %
  • negation: !

Bitwise or, and, and xor where not added as the standard symbols where already taken.

Standard excel operators

  • standard arithmetic: +, -, /, *
  • exponential: ^
  • string concatenation: &
  • standard inequalities: <, <=, >=, >
  • unary minus: -

Building

  • npm install
  • npm run build

eft's People

Contributors

md5crypt avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  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.