In my opinion, XWPF would be the better option for the simple reason that the
resulting files - the .docx OOXML files - are merely zipped xml which it is
easy to open and examine when and if problems occur. Also, it has been my
experience that HWPF can produce corrupt files if used for a search/replace
operation. Also the operation itself would not complete successfully if the
replacement term was longer than the serach term - the api threw an
exception if this occurred I believe. I have not tested the very latest
iteration of the api and things may well be better now of course.

At this point, and because I cannot offer any advice based upon concrete
experience with a recent iteration of the libraries, I can only reccommend
that you have a good search through the messages posted to the user list. I
remember someone using XWPF for a search and replace operation - I
contributed to the discussion early on but do not remember the conclusion -
but I am unsure about tables - again I know a question was asked about
merging rows/columns which we were unable to accomplish with the api at that
time. If I have the time this week, I will try to look out the test code I
have assembled to test the capabilities of both libraries and will post here
what I find. With luck, someone else far more experienced with these
specific libraries than I will see this thread and contribute to the
discussion. Also, it may well be the case that the libraries currently do
not have the capabaility to do exactly what you require. In that case, it
would be appreciated if you could work with the developers to add these
features.

Yours

Mark B
-- 
View this message in context: 
http://apache-poi.1045710.n5.nabble.com/Replacing-placeholder-to-a-Table-tp3392424p3393766.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to