How to replace .docx table values using Apache POI

Here is an example on using Apache POI to read data from tables inside a .docx file and then write some data in it, the source also deletes the original file and replaces it for the corrected one. important thing about this code is that once you have downloaded the POI, the libs that you will get will not be enough to make it work!

You will need to download the ooxml-schemas-1.1.jar file and add it to your classpath, you can find it right here.