[IT] Create Simple Project for handling docx using Apache POI Part 2/2
[IT] Create Simple Project for handling docx using Apache POI Part 1/2
In the last post, I checked the Simple Maven Project Creation and "pom.xml".
In this post, Let's add a component necessary for Word document editing to "pom.xml" and then print a test documnet.
@ Apache POI's Artifacts
This is a list of Artifacts required for editing Word documents.
You should refer to this and add them to <Defendencies> of "pom.xml".
The added content is shown in the figure below.
@ Creation of Simple Project to read Word document
When the "pom.xml" configuration is finished, create a class to test the function.
Once you are going to print the contents to the console, select "public static void main(Stringp[] args)".
If the class was created normally, enter the test code below.
package myhome.testprj; |
For the path of .docx that loads File from source and the path of using FileOutputStream, enter an appropriate path for you.
Excute [Debug As] - [Java Application] of the class and check the result.
If the contents of the document you created are displayed in the console tab, the environment in which you can check the Word functions is configured.
From next time, let's look at the code necessary to actually implement the function.