joshbtn / excelFormulaUtilitiesJS

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.
http://excelformulabeautifier.com/
Other
394 stars 101 forks source link

Not giving the accurate functions (absolute, minimum & maximum) #39

Closed kirti-kathpal closed 7 years ago

kirti-kathpal commented 8 years ago

I am using excelFormulaUtilities.formula2JavaScript('=min(2,3)') which gives me Math.Min(2,3) But there's no function by this name. It should give me Math.min and not Math.Min. Same is for the MIN & ABS.

joshbtn commented 8 years ago

Try including this library https://github.com/sutoiku/formula.js. They have done a nice job of porting all Excel functions to JS.

ghost commented 8 years ago

The problem is the Upper case of the returned function.

For example input is min(1 ,2) for formulaToJavascript method it will give output as Math.Min(1, 2) It should be Math.min(1, 2).

joshbtn commented 8 years ago

Sorry I misunderstood. This should be an easy fix, I'll get this in shortly.

joshbtn commented 8 years ago

I made this change and updated the npm package. Thanks for your feedback.