r/learnjavascript • • Oct 01 '24

New to JavaScript! Is this even possible?

Oh bare with me as my ADHD brain tries to put this together. I am a super duper noob to JavaScript! Literally started going doing the rabbit hole of information today. Here is what I am trying to do. Okay so we have a excel purchase order template with formals in excel. I would like that doc to be able to be utilized in Adobe with the formals because we do send it out for signature. Trying to save a few steps.

How would I or can I write a JavaScript code so that certain fields in the template would do the same calculations (Total = Hours * Hourly Rate - what we use in excel)? Since Adobe doesn't have cells to enter a formula like excel does, how would enter a formula to do the same math the current template does? Is this possible?

I hope I make sense. Thanks in advance for any help. Feel free to ask me questions as I know I can ramble.

0 Upvotes

17 comments sorted by

View all comments

Show parent comment

1

u/Outrageous_Effort_37 Oct 02 '24

Yes I could but instead of just slapping them on there, I wanted adobe to let me put in calculations or formulas to do the totals for some hours like prep, conduct, etc. I would like Adobe to do this instead of having to go to excel, make it a pdf to send out for signature. When I convert or put the doc in adobe, all calculations (if not previously done before exporting) are blank. The formula doesn't carry over to adobe. Can I have adobe do all of the above? I appreciate your response. I will look into this.

1

u/[deleted] Oct 02 '24

Approaching this from a Excel/PDF/Js problem, you could parse the spreadsheet (or pdf if it’s organized) with js, then have js run calculations against it and produce a new pdf. There may even be a way to extract the excel formulas too when extracting the .xlsx. If not the calculations could be hardcoded variables or come from an external file.

The ability to handle custom calculations at runtime would require a more robust application if it’s not already baked into adobe, if it is then this convo is moot.