当我尝试将getRange与XWPFDocument
和getParagraphText()
与XWPFWordExtractor
一起使用时,我收到错误。我怎么能一起使用它们?我需要将我的.docx转换为.doc吗?如果是,那该怎么做?
XWPFDocument docx = new XWPFDocument(new FileInputStream("textDocx.docx"));
XWPFWordExtractor we = new XWPFWordExtractor(docx);
Range range = docx.getRange();
String[] paragraphs = we.getParagraphText();