tags:

views:

88

answers:

4

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

+2  A: 

Take a look at http://poi.apache.org/

adatapost
that was close man - you beat me by 5 sec.
Kai
+1 I posted your idea.
adatapost
But does it handle macros ?
Brian Agnew
A: 

Does this API do what you need?

djna
A: 

You can try java Excel automation,

Here is a useful link: http://www.jacozoom.com/en%5FjacoZoom.shtml

liya
+4  A: 

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.

Aaron Digulla
+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)
Brian Agnew
+1 Yes it is practical and helpful solution.
adatapost