Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

- Home
- >
- Acrobat SDK
- >
- can these formulas (excel) be converted to calcula...

can these formulas (excel) be converted to calculate on a pdf form

New Here
,

Jul 21, 2018

Copy link to clipboard

Copied

these are the formulas

3 separate cells

=ROUND((10^7.96427)*10^((-1628.445/(T24+273.15)))*10^((-100151/(T24+273.15)^2)),2)

=ROUND((10^7.96427)*10^((-1628.445/(T25+273.15)))*10^((-100151/(T25+273.15)^2)),2)

=(Y27-(0.00066*760*(T24-T25)*(1+(0.00115*T25))))/Y26

Thanks in advance

TOPICS

Acrobat SDK and JavaScript,
Windows

Community Guidelines

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

can these formulas (excel) be converted to calculate on a pdf form

New Here
,

Jul 21, 2018

Copy link to clipboard

Copied

these are the formulas

3 separate cells

=ROUND((10^7.96427)*10^((-1628.445/(T24+273.15)))*10^((-100151/(T24+273.15)^2)),2)

=ROUND((10^7.96427)*10^((-1628.445/(T25+273.15)))*10^((-100151/(T25+273.15)^2)),2)

=(Y27-(0.00066*760*(T24-T25)*(1+(0.00115*T25))))/Y26

Thanks in advance

TOPICS

Acrobat SDK and JavaScript,
Windows

Community Guidelines

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

markg90430338

Jul 21, 2018
0
/t5/acrobat-sdk/can-these-formulas-excel-be-converted-to-calculate-on-a-pdf-form/td-p/10045080
7
Replies
7

Adobe Community Professional
,

Jul 21, 2018

Copy link to clipboard

Copied

Community Guidelines

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

Reply

Loading...

gkaiseril

Jul 21, 2018
0
/t5/acrobat-sdk/can-these-formulas-excel-be-converted-to-calculate-on-a-pdf-form/m-p/10045081#M20158
New Here
,

Jul 21, 2018

Copy link to clipboard

Copied

i unfortunately have no experience writing javascript.

i tired a in the example below but could not get the proper calculation

event.value=Math.exp((10^7.96427)*10^((-1628.445/(WBC+273.15)))*10^((-100151/(WBC+273.15)^2)),2)

event.value=Math.exp((10^7.96427)*10^((-1628.445/(DBC+273.15)))*10^((-100151/(DBC+273.15)^2)),2)

Y27-(0.00066*760*(T24-T25)*(1+(0.00115*T25))))/Y26

Where have i gone wrong?

Community Guidelines

Reply

Loading...

markg90430338

Jul 21, 2018
0
/t5/acrobat-sdk/can-these-formulas-excel-be-converted-to-calculate-on-a-pdf-form/m-p/10045082#M20159
New Here
,

Jul 21, 2018

Copy link to clipboard

Copied

ultimately i would like to calculate relative humidity from dry bulb and wet bulb temperature. there are a couple different ways to calculate, however can not get any proper calculation as i am javascript illiterate. attached original formulas and an excel sheet that does what i need (formulas imbedded)

https://www.sksato.co.jp/html_e/files/Psychrometer1.1E.xls

any help would be muchly appreciated.

Community Guidelines

Reply

Loading...

markg90430338

Jul 21, 2018
0
/t5/acrobat-sdk/can-these-formulas-excel-be-converted-to-calculate-on-a-pdf-form/m-p/10045083#M20160
Most Valuable Participant
,

Jul 21, 2018

Copy link to clipboard

Copied

First of all, check the JS Console and you'll see some error messages. The first one will be probably be something like this:

ReferenceError: WBC is not defined

1:Console:Exec

That happens because there's no variable called WBC. You can't access the value of a field directly. You need to use the getField method, and then the value property, like this:

var WBC = this.getField("WBC").value;

And if you want to make sure it's a number, use this:

var WBC = Number(this.getField("WBC").value);

Make those changes and try again. Check if there still error messages in the Console, and repeat...

Community Guidelines

Reply

Loading...

try67

Jul 21, 2018
0
/t5/acrobat-sdk/can-these-formulas-excel-be-converted-to-calculate-on-a-pdf-form/m-p/10045084#M20161
Adobe Community Professional
,

Jul 21, 2018

Copy link to clipboard

Copied

Did you read the linked description for the Math.exp?

You might want to use the Math.pow() method.

Syntax

Math.pow(base, exponent)

Parameters

base

The base number.

exponent

The exponent used to raise the base.

Return value

A number representing the given base taken to the power of the given exponent.

Community Guidelines

Reply

Loading...

gkaiseril

Jul 21, 2018
0
/t5/acrobat-sdk/can-these-formulas-excel-be-converted-to-calculate-on-a-pdf-form/m-p/10045085#M20162
New Here
,

Jul 21, 2018

Copy link to clipboard

Copied

thank you for this but it looks like its way over my head, anyone care to take a crack at it?

i will try my best to post existing formulas from excel with explainations

will be calculated from 3 separate text fields

text field - es

=ROUND((10^7.96427)*10^((-1628.445/(dbr+273.15)))*10^((-100151/(dbr+273.15)^2)),2)

text field - ew

=ROUND((10^7.96427)*10^((-1628.445/(wbr+273.15)))*10^((-100151/(wbr+273.15)^2)),2)

text field - e

=(es-(0.00066*760*(dbr-wbr)*(1+(0.00115*wbr))))/ew

text fields dbr and wbr could have any number between 0 to 130

any help would be great!

thanks in advance

Community Guidelines

Reply

Loading...

markg90430338

Jul 21, 2018
0
/t5/acrobat-sdk/can-these-formulas-excel-be-converted-to-calculate-on-a-pdf-form/m-p/10045086#M20163
gkaiseril
LATEST

Adobe Community Professional
,

Jul 22, 2018

Copy link to clipboard

Copied

You are clearly not writing JavaScript. JavaScript is an object orientated language. That means you have an object and that object can have various properties beyond the value. So you cannot write code as one does within a cell in Excel. I have looked at your locked worksheet and the formulas that you have posted. It is clear the data used in your formulas is coming from cells that I cannot view.

There free and pay for resources for learning JavaScript for Acrobat.

Community Guidelines

Reply

Loading...

gkaiseril

Jul 22, 2018
0
/t5/acrobat-sdk/can-these-formulas-excel-be-converted-to-calculate-on-a-pdf-form/m-p/10045087#M20164
Using the Community
Experience League
Terms of Use
Privacy Policy
Cookie preferences
AdChoices
Language:

- Deutsch
- English
- Español
- Français
- 日本語コミュニティ
- Português

Copyright © 2020 Adobe. All rights reserved.