Reputation: 1
im new to java programing.
I want to create a simple program that reads a .xls / .xlsx document, calls a macro, and saves the file. Im using org.apache.poi and everything seems fine except for calling a macro. Ive been looking up for some tips on forums but found nothing.
macro was created before and its saved. i just have a lot of documents and dont want to do it manually.
in Java Ive created a workbook, created a sheet. How to call a macro to be done? should i refer to a workbook or sheet itself?
thanks in advance!
Upvotes: 0
Views: 2769
Reputation: 16932
There are several ways to achieve this:
Upvotes: 1
Reputation: 4591
This is not currently possible. POI is a library to read/edit Office files. It will preserve any macros that exists in the file, but it does not have an interpreter built in to run macros.
Upvotes: 0