I needed the ability to safely execute formulas in my .NET app. My solution was to write a parser and interpreter. Here it is:
https://github.com/Rajeev-K/formula-parser
Also, how would one execute said formula?
(latestquote - previousquote) / previousquote
iif(isonlineorder, "Online", "Retail")
FirstName & " " & LastName
iif(IsNothing(Amount), "Amount missing", Format(Amount, "c2"))
"Q" & ((OrderDate.Month - 1) \ 3 + 1)
MonthName(DatePart(DateInterval.Month, Today), false)
DateAdd(DateInterval.Day, 1, Today)
See this file for example of usage:
https://github.com/Rajeev-K/formula-parser/blob/master/src/R...