JXLL 介绍
JXLL 提供了一个 Java 的接口用来跟 Excel Addins (XLLs) 交互,可以直接执行 Addins 中提供的函数。
示例代码:
import org.boris.jxll.Addin; import org.boris.jxll.XLL; import org.boris.jxll.XLOper; public class JXLLExample { public static void main(String[] args) throws Exception { System.out.println("Loading TestXLL.dll..."); // Load the XLL and check the result Addin a = XLL.load("TestXLL.dll"); if (a == null) { System.out.println("Failed to load addin"); return; } // Create some random arguments double a1 = Math.round(Math.random() * 60000) / 100.; double a2 = Math.round(Math.random() * 4000) / 100.; System.out.println("Invoking TestSum(" + a1 + "," + a2 + ")"); // Invoke the TestSum functon XLOper res = a.invoke("TestSum", new Double(a1), new Double(a2)); // Output the result System.out.println(res.num); } }
JXLL 官网
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。