Re: XWPF Remove Paragraph from TextBox
W Kingt <[email protected]>
| Newsgroups | gmane.comp.jakarta.poi.user |
|---|---|
| Message-ID | <HK0PR01MB3489F21397E0F6CFA9D69D59ACCE0@HK0PR01MB3489.apcprd01.prod.exchangelabs.com> |
Hi, I'm using this code to clear the TextBox.
public static void clearTextShape(TextShape<?, ?> shape) {
if (shape instanceof XSLFTextShape) {
((XSLFTextShape) shape).clearText();
} else {
List<?> paragraphs = shape.getTextParagraphs();
paragraphs.clear();
}
}
P.S. This is from none official
On 2019/12/22 02:28:03, Nathan Motter <[email protected]<mailto:[email protected]>> wrote:
> I have been struggling to remove a paragraph from a text box. Could someone provide and example? Use Case: I am looping through a text box looking for particular text. Once I identify the text I want to remove the entire paragraph. Thanks for any help you can provide. >
>
> --------------------------------------------------------------------->
> To unsubscribe, e-mail: [email protected]<mailto:[email protected]>>
> For additional commands, e-mail: [email protected]<mailto:[email protected]>>
>
>