Greetings StackOverflow,
I searched the great Internet and was saddled with numerous waste messages or answers that explain the exact opposite order of what I'm trying.
I have an Excel file with a large set of VBA code. There are 4 publicly available routines that do not accept any parameters that can be called by the user when opening a document in Excel, while they process data in various sheets as needed. We have a great Java application with which we would like to interact with this document by invoking Macros from the Java environment. The thing is, we only need to write VBA code once, and then Java can call it to execute. In addition, we want to assume that the user of the Java application does not necessarily have immediate access to Excel, but works on a computer running Windows. How should this be done?
Putting VBA code in a DLL and calling it from Java? How do you compile a DLL, what is the use of Visual Studio for? What do we call DLLs with Java? Should we try some kind of COM object?
Please note that as the most common answer to my question elsewhere, I quite clearly understand how to call Java from VBA, but not to call VBA from Java.
Thanks in advance.
Reivax
source share