Hello Gabriele,

I am sorry to say this but I think that HWPF is still not mature enough to
be able to satisfy your requirement. Having said that, you do have other
options and which you choose depends upon the platform you are targetting
and the architecture of your application;

1. OLE. If you intend to run the application on a Windows PC and if a copy
of Excel is installed on that machine, then you can use OLE. A third party
library will be required - the one I have used is Eclipse SWT - and you will
need to become fairly comfortable with VBA. The big advantage of this
approach however is that, as you are actually using Word to do the work for
you, compatibility is not an issue.

2. OpenOffice/UNO. OpenOffice has an API called UNO - Universal Network
Objects - and you can use that to control OpenOffice. OpenOffice has filters
that allow it to read and write many Word documents and it is 'platform
independent'. However, I am not at all sure of the applications ability to
function well in a client server environment.

3. There are commercial products available - Aspose is the one that always
turns up when I Google for this sort of thing. They promise to be both
platform independent and to offer the ability to run the resulting
application in distributed environments. Never having used any of these
tools however, I cannot really comment on their utility.

4. If you are targetting the OpenXML based file format rather than the
binary one, you could look at docx4j. Again, this is not a library that I
have used myself.

If you are interested, I have examples of Search and Replace routines
written using both OLE and SWT. I am quite happy to let you have the code
but, as this will not relate to POI in any way, it may be best if you email
me directly rather than post such a request to the list.

Yours

Mark B


gabriele gentile wrote:
> 
> Hi,
> i've an esigence to read an a word document (like a template) and to
> produce another word document with field retrivied from database (for
> example. name,surname,date of birth...) integrated and with same
> properties of originale document (font,spacing,color).
> 
> How do you resolve this with POI? It's possible to have an example for my
> case? 
> 
> Thanks in advance
> Gabriele
>   
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Read-Write-Word-Document-tp24351754p24376145.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