Hi Christian,

At 19:02 01.03.2007, Christian Bongiorno wrote:
>The file output can be in any form I like as long as it can be opened by 
>MS word and looks nice. It's currently output in that XMLish form. I 
>can't invest a lot of time in this so staring at file formats and 
>deciphering them is out.

Then (unless the XML-suggestion from Anthony Andrews works for your
situation) I would suggest that you look for RTF-files - I seem to remember
that there should be a library which can handle RTF well, but I don't know
the details any more.

>I was looking at the API's and there is a 
>HWPFDocument.write(OutputStream). I tried that and it does work; the 
>output appears to be native binary doc format, which is fine with me.

Again my warning: take a few files, read them in, write them out and read
them with Word. Ideally with different versions (2000, XP, whatever...).
Don't be surprised if a significant part of the files does not work.

>So, what I can do is identify portions in the document to be updated, 
>slam home new values, and save the file out.
>
>The one trick part is that I need to generate a dynamic table in the 
>doc. The columns are the same but the number of rows differ.

Inserting tables (or rows) is not properly supported. Table formats are
ugly beasts in the Word file format. If you need to insert rows, you should
indeed look for something other than HWPF.

best wishes, Rainer


---------------------------------------------------------------------
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/

Reply via email to