i'm using poi to export a word file. it's my source. the question is that if the run is a textRun,i can remove it by this method(para.removeRun) but if the run is a XWPFHyperlinkRun it doesn't work .. so...how can i remove a XWPFHyperlinkRun?
InputStream fs = new FileInputStream("MY_WORD_FILE_Path"); XWPFDocument doc=new XWPFDocument(fs); List<XWPFParagraph> paras = doc.getParagraphs(); for (XWPFParagraph para : paras) { para.removeRun(0); } FileOutputStream out = new FileOutputStream("D:\\testxx.docx"); doc.write(out); out.close();