Java – Adding Apache POI to Eclipse

apache-poijavams-word

I am not very good at adding anything to java so this is new to me, after spending hours on the internet I haven't found anything that I can easily understand, can anyone explain a couple things to me.

  1. If I use Apache POI to create a java file and run the class on another machine will it run without Apache POI, if it won't run can anyone think of another way to write a word document using java.

  2. How do I add the package to Eclipse, I download the Apache POI 3.9 src zip edition. I read that I am suppose to have 3 jar files which are not in the zip file, I tried adding the zip file to eclipse under the package properties "Add External Jar" option with no avail.

Any input is appreciated, what I am trying to do is creating a list of names from a text file and sorting that list, removing duplicates, then printing the list to a Word Document in five columns per page, if I could print in columns in a text file that would work to. Lastly, I would like to thank this community, this is an awesome website and has helped me greatly the past couple years.

Best Answer

Your best bet is to either wait for POI 3.10 beta 3, or just grab the latest source tree from SVN. As of quite recently, Apache POI now ships with an Eclipse project file in the source tree.

Once you've got a new enough copy of Apache POI, simply fire up Eclipse, choose File then Import. Pick Existing Project into Workspace then select the directory where you POI source tree is. Follow the wizard to complete the project import, then you'll be away!

Related Topic