Microsoft Excel Macro to run Java program

前端 未结 4 491
一向
一向 2020-12-03 06:12

I have learnt to read and write an Excel file using a Java program with the help of Jxl and POI API. Is it possible to run a Java program with the help of macros?

4条回答
  •  清歌不尽
    2020-12-03 06:29

    Much better than the other suggested solutions is to create an Excel Add-In in Java using Jinx (https://exceljava.com).

    See https://exceljava.com/docs/macros.html for details of how to write Excel macros in Java.

    As well as macros, it is also possible to write user defined functions and menus.

    In fact, you can use Java as a full replacement for VBA! See https://github.com/exceljava/jinx-com4j for how to call the Excel Object Model to allow you to do everything you can in VBA from Java.

提交回复
热议问题