【发布时间】:2017-07-02 20:24:56
【问题描述】:
我有这个 excel 宏:
Function Calculate_Something(StartDate As Date, EndDate As Date) As Double
//some math is here, not important
Calculate_Something = Result
End Function
我想将我的日期传递给这个宏,在我的 Java 程序中执行它,最后得到返回值并将它分配给我在 Java 中的值。
我已经用这个函数创建了 VBS 脚本,并尝试在 Java 中像这样执行它:
String[] parms = {"wscript", "calc.vbs", "2017-02-06 09:38:36", "2017-02-06 12:47:41"};
Runtime.getRuntime().exec(parms);
但它没有用。你知道我该怎么做吗?
【问题讨论】: