发布网友
共2个回答
热心网友
XWPFDocument docx = new XWPFDocument(POIXMLDocument.openPackage(电月度例会会议纪要.docx)); int pages = docx.getProperties().getExtendedProperties().getUnderlyingProperties().getPages();//总页数 int wordCount = docx.getProperties().getExtendedProperties().getUnderlyingProperties().getCharacters();// 忽略空格的总字符数 另外还有getCharactersWithSpaces()方法获取带空格的总字数。 System.out.println (pages= + pages + wordCount= + wordCount);} public static void parse97() throws Exception { WordExtractor doc = new WordExtractor(new FileInputStream(电月度例会会议纪要.doc));
热心网友
使用poi操作office