On Mon, 26 Jun 2006, anoob wrote:
My requirement is to access all the contents of a particular word
File and modify the contents and put them back. When i am trying to
modify the Word file thru HWPFFileSystem and then try to set it back thru
getStrem i am getting a null value. Can any one help me out how to
resolve this issue.
Unfortunately, there are known to be a few bugs in the HWPF change+write
support. Alas, Ryan Ackley didn't get to fix them all before he left the
project, so it is possible that you won't be able to do everything you
hoped to.
With that in mind, patches to improve hwpf are gratefully received!
With regard to your problem, you should probably be using HWPFDocument. It
provides a much nicer interface than HWPFFileSystem.
Just give an input stream to HWPFDocument, find the ranges / character
runs / paragraphs of interest, change them, then use
doc.write(OutputStream) when you're done
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/