0
我想爲同一段落設置多個樣式,只應用一種樣式。我想應用多種風格如何使用apache poi將多個樣式設置爲單詞段落
XWPFDocument document = new XWPFDocument(new FileInputStream("D:\\LatestStyleTemplates.docx"));
out = new FileOutputStream(new File("D:\\createdocument.docx"));
XWPFParagraph article = document.createParagraph();
XWPFParagraph title = document.createParagraph();
XWPFParagraph endnoteText = document.createParagraph();
XWPFParagraph heading1 = document.createParagraph();
endnoteText.setStyle("Strong");
endnoteText.setStyle("EndnoteText");
Microsoft Word甚至允許您這樣做嗎? – Gagravarr