good morning
I ask for your collaboration to make edits of word files, because it only
allows me to extract the data, but it does not allow me to modify it.
this is the code that implements to extract the data of the labels.
XWPFDocument docx = new XWPFDocument (new FileInputStream (rut));
int cons = 0;
for (IBodyElement elem: docx.getBodyElements ()) {
String con = Integer.toString (cons);
if (elem instanceof XWPFSDT) {
String text = ((XWPFSDT)) .getTag ();
if (text.contains (with + "ME_DOM_NAME")) {
des.setName ((((XWPFSDT) elem) .getContent ());
}
if (text.contains (with + "ME_CHECK_DESTINO")) {
des.setCargo ((((XWPFSDT) elem) .getContent ());
}
if (text.contains (with + "ME_DEPENDENCE_DESTINO")) {
de.setDepartment ((((XWPFSDT)) .getContent ());
cons ++;
listdes.add (des);
des = new Recipient ();
}
}
}
docx.close ();
--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]