What exactly does need for POI Excel API

dskim picture dskim · Jul 23, 2013 · Viewed 14.2k times · Source

I'm working on program that make Excel data via POI API 3.9 .

but there are many Jar files in directory as follows.

poi-3.9-20121203 
poi-excelant-3.9-20121203  
poi-ooxml-3.9-20121203 
poi-ooxml-schemas-3.9-20121203 
poi-scratchpad-3.9-20121203 
ooxml-lib/xmlbeans-2.3.0  
lib/commons-logging-1.1 
..etc.

I just need creating, reading and writing excel files . i'm confused what jar files is need.

please tell me what files i got to import. I have read many domcuments on website . But i'can find it about that.

Thank you

Answer

LaurentG picture LaurentG · Jul 23, 2013

You probably have to import all of them. As many frameworks, Apache POI is splitted in different libraries. Apache POI also uses external libraries like XML Beans.

On the Apache POI website, you will find the list of components and for which goal there are needed, look at the Component Map section.

Typically if you are handling only old Excel files, you don't need the poi-ooxml dependency.

Note that your list of external dependencies is listed in the Prerequisites column of the second table of the Component Map section, as described there you also need additional libraries: commons-logging, commons-codec, log4j.

Finally, to avoid headaches with dependency management, you could use a tool like Maven which cares of this for you.