POI解析word03和word07
所需要的jar包:
dom4j-1.6.1.jar
poi-3.8-20120326.jar
poi-examples-3.8-20120326.jar
poi-excelant-3.8-20120326.jar
poi-ooxml-3.8-20120326.jar
poi-ooxml-schemas-3.8-20120326.jar
poi-scratchpad-3.8-20120326.jar
stax-api-1.0.1.jar
xmlbeans-2.3.0.jar
POI解析word03(HWPFDocument)
public static boolean Word(File file){List<XWPFTable> tableList = new ArrayList<XWPFTable>();OPCPackage opcPackage = null;XWPFDocument doc = null;try {opcPackage = POIXMLDocument.openPackage(file.getPath());doc = new XWPFDocument(opcPackage);} catch (IOException e) {e.printStackTrace();}List<XWPFParagraph> paras = doc.getParagraphs();for(int i = 0;i < paras.size() ; i++){System.out.println(paras.get(i).getText());}return true;}POI API:http://pan.baidu.com/share/link?shareid=1163170766&uk=672711972