I have this excel macro:
Function Calculate_Something(StartDate As Date, EndDate As Date) As Double
//some math is here, not important
Calculate_Something = Result
End Function
And I want to pass my dates to this macro, execute it in my Java program and finally get returned value and assign it to my value in Java.
I have created VBS script with this function and try to execute it like this in Java:
String[] parms = {"wscript", "calc.vbs", "2017-02-06 09:38:36", "2017-02-06 12:47:41"};
Runtime.getRuntime().exec(parms);
But it didn't work. Do you know how could I do that?