首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

POI解析word03跟word07

2013-10-19 
POI解析word03和word07所需要的jar包:dom4j-1.6.1.jarpoi-3.8-20120326.jarpoi-examples-3.8-20120326.jar

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


热点排行