1

is it possible to create a java application that will import excel files . execute excel macros and give the output in java gui. please give any advice u can on creating such an application. i will start creating the application after your input

3 Answers 3

4

Apache POI can read Excel files and it should expose the code of the macros, too. To actually run the macros, you'll need a VBA interpreter and a COM server. I doubt that you'll be able to make this work for complex macros (see this discussion).

Instead, try JaCob which allows you to talk to Excel from Java. This way, you should be able to load a work sheet, have Excel run the macros for you and then, you can examine the results.

Sign up to request clarification or add additional context in comments.

1 Comment

+1 I think this is the most practical solution. I don't believe POI can do much with macros (the last time I looked, you couldn't write macros with POI - but perhaps that's changed now)
0

Does this API do what you need?

Comments

0

You can try java Excel automation,

Here is a useful link: http://www.jacozoom.com/en_jacoZoom.shtml

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.