Convert Excel formula to Javascript

New Here ,
May 09, 2019

Copy link to clipboard

Copied

Hello,

I would like convert this formulas to work in Javascript.

=(D6*(12/1+(E4-1)*(12/1+1)/2)*(1+(E4^(D10*1)-E4)/(E4-1))+D4*(E4^(D10*1)))*1


D6 = 200000

D10 =1000

E4 = 1,07

result in excel = 1099444,405

please help

TOPICS
Acrobat SDK and JavaScript, Windows

Views

76

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Convert Excel formula to Javascript

New Here ,
May 09, 2019

Copy link to clipboard

Copied

Hello,

I would like convert this formulas to work in Javascript.

=(D6*(12/1+(E4-1)*(12/1+1)/2)*(1+(E4^(D10*1)-E4)/(E4-1))+D4*(E4^(D10*1)))*1


D6 = 200000

D10 =1000

E4 = 1,07

result in excel = 1099444,405

please help

TOPICS
Acrobat SDK and JavaScript, Windows

Views

77

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 09, 2019 0
try67 LATEST
Most Valuable Participant ,
May 09, 2019

Copy link to clipboard

Copied

This is just a simple mathematical formula. You just need to get the values of the fields corresponding to the cells from the Excel file, and then perform the calculation and apply it to event.value at the end.

The only difference is in how you would do the exponent function. In JavaScript you do it like this:

Math.pow(a,b)

which is the same as

a^b

The rest is exactly the same.

Also, see this tutorial: https://acrobatusers.com/tutorials/how-to-do-not-so-simple-form-calculations

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 09, 2019 0