How to replace placeholders in header of docx in java using poi 3.8

前端 未结 4 1616
醉酒成梦
醉酒成梦 2020-12-06 21:07

I\'m tying to replace tokens in the header of docx file.I have handled the token replacement in paragraphs and tables but its not picking the header data. Im using apache po

4条回答
  •  臣服心动
    2020-12-06 21:36

    Code referred by (edited Sep 30 '16 at 1:19, Julio Villane) works for only headers across the document. Thanks for the code. To Replace in Footer, Same code has to called inside iteration of FooterList. To Replace across the document other than Header and Footer, You have to call the replaceParagraph(), replaceTable() again,to replace text across the document, other than Header and Footer.

提交回复
热议问题