Hallo everyboby.
I have benn looking for the last days in internet trying to find a
solution for my problem, and I found nothing that could help me...so I am
asking you help...
The problem:
I store in oracle table field (BLOB) a word document.This document is a
template whose content is text and also few fields that I'm trying to
fill up at runtime using HWPFDocument...but I don't find the way.
What I want to do is at field with name "name" put e.g. "Myname", to
address put "MyAddress" and so on.....
Here few code lines and what it prints
Range r = wordDocument.getRange();
for (int x = 0; x < r.numSections(); x++){
Section s = r.getSection(x);
for (int y = 0; y < s.numParagraphs(); y++){
Paragraph p = s.getParagraph(y);
for (int z = 0; z < p.numCharacterRuns(); z++){
CharacterRun run = p.getCharacterRun(z);
//character run text
String text = run.text();
System.out.println(text);
}
}
}
"name"
John Smith
"address"
99 North Road
"postCode"
X1 2YZ
"city"
London
"date"
Tuesday, 8 August 2006
Dear
"name"
John Smith
.........
Hope my english is understandable...
Thanks in advance.
Gilio Simione
P.S.
Here is the template stores in the database.
Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede
contener informacion confidencial, siendo para uso exclusivo del
destinatario, quedando prohibida su divulgacion copia o distribucion a
terceros sin la autorizacion expresa del remitente. Si Vd. ha recibido
este mensaje erroneamente, se ruega lo notifique al remitente y
proceda a su borrado.
Gracias por su colaboracion.
This message (including any attachments) may contain confidential
information. It is intended for use by the recipient only. Any
dissemination, copying or distribution to third parties without the
express consent of the sender is strictly prohibited. If you have
received this message in error, please delete it immediately and
notify the sender.
Thank you for your collaboration.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]