Skip to content
Advertisement

Tag: docx

SUM(ABOVE) functionality in apache poi or docx4j

I am trying to implement =SUM(ABOVE) function in docx which is used to sum all elements above to tht column. I was able to implement this with apache poi using : This is ok when someone opens the document and it calculates it. But if I need to convert the document without opening it to pdf then this function doesnt

Replace text templates inside .docx (Apache POI, Docx4j or other)

I want to do replacements in MS Word (.docx) document using regular expression (java RegEx): I tried to get text templates (like %SOME_TEXT%) use Apache POI – XWPF and replace text, but replacement is not guaranteed, because POI separates runs => I get something like this(System.out.println(run.getText(0))): code example: I have found many similar questions (like this “Replacing a text in

Advertisement