Monday, April 14, 2014

Java program to create doc/docx file

Apache POI can be used to create a doc/docx file. To know more click here.

You can download latest version of jar files(i.e. poi-bin-3.10-FINAL-20140208.zip) form below link.
http://poi.apache.org/download.html

Add below mentioned Jar files in your classpath -

  • poi-3.10-FINAL-20140208.jar
  • poi-ooxml-3.10-FINAL-20140208.jar
  • poi-ooxml-schemas-3.10-FINAL-20140208.jar
  • poi-scratchpad-3.10-FINAL-20140208.jar
  • xmlbeans-2.3.0.jar
  • dom4j-1.6.1.jar

Please see the self explanatory java code below

Java program to read doc/docx file

Apache POI can be used to read doc/docx file. To know more click here.

You can download latest version of jar files(i.e. poi-bin-3.10-FINAL-20140208.zip) form below link.
http://poi.apache.org/download.html

Add below mentioned Jar files in your classpath -
  • poi-3.10-FINAL-20140208.jar
  • poi-ooxml-3.10-FINAL-20140208.jar
  • poi-ooxml-schemas-3.10-FINAL-20140208.jar
  • poi-scratchpad-3.10-FINAL-20140208.jar
  • xmlbeans-2.3.0.jar
  • dom4j-1.6.1.jar
Please see the self explanatory java code below