Calculations using forms
Copy link to clipboard
Copied
Hi!
I've got a simple Excel spreadsheet that allows user input to produce 15 or so cells with calculated values. The idea is to let a user change one or more values to see what impact those changes would make on the outputs. I can create the form to gather all the input. What I'd like is your thoughts on how to perform the calculations and display them. FWIW, all the input and display cells in Excel are named, and I would use the same names as vars in my CFML. Here's the inputs:
The formulas are lengthy, because of the length of the names, but they use simple arithmetic. For instance, like:
Average Income Per Hour =Avg_Del_Inc_Ttl/(Hours_Per_Shift*Delivery_Percent_Time)
I have some study to do. I'm just uncertain which path will get me to where I want to go. Do I need to employ cfscript? Or can I just do the math on new variables whose values I pull from the form field values and other previously calculated variables?
Not looking to have my code tweaked. I'm just looking for advice on the approach you might use—how you'd explain it at a high level.
Thanks!
John
Copy link to clipboard
Copied
I have a question. Why would you need a form for input? After all, ColdFusion can read the data off of an Excel sheet. 🙂

