You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2011/08/03 04:54:44 UTC
DO NOT REPLY [Bug 51604] replace text fails for doc ( poi 3.8 beta
release from download site )
https://issues.apache.org/bugzilla/show_bug.cgi?id=51604
sanmoy <sa...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS/Version| |All
--- Comment #1 from sanmoy <sa...@gmail.com> 2011-08-03 02:54:44 UTC ---
One addition,
fileOutputStream.close() is present in the original code, by mistake, which i
didn't copy while raising the defect.
Please remember, the following code is working perfectly
XWPFDocument xwpfDocument = new XWPFDocument(inputStream);
List<XWPFParagraph> paragraphs = xwpfDocument.getParagraphs();
for(XWPFParagraph xParagraph:paragraphs)
{
for(XWPFRun xwpfRun : xParagraph.getRuns())
{
xwpfRun.setText("replace", 0);
}
}
xwpfDocument.write(outputStream);
outputStream.close();
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org