Try this

XWPFParagraph para = new XWPFParagraph(
   
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP.Factory.newInstance());

That compiles and seems to run perfectly well. Of course, you will then need
to add runs to the paragraph in order to add any text to it but this shoulod
get you started.

Yours

Mark B


Immad Naseer wrote:
> 
> Hi all,
> 
> How would I add a paragraph to a XWPFTableCell? While XWPFTableCell
> contains
> an addParagraph method, that method expects an already instantiated
> paragraph object to be passed to it and there doesn't seem to be a simple
> way to create stand-alone XWPFParagraph objects that I can attach to the
> body or table after creation.
> 
> Is there some simple way to add paragraphs to XWPFTableCell like you can
> add
> paragraphs to a document using XWPFDocument.createParagraph?
> 
> Regards,
> Immad
> 
> PS: I am using the 3.7 beta release of POI.
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Adding-paragraphs-to-XWPFTableCell-tp28955249p28972405.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@poi.apache.org
For additional commands, e-mail: user-h...@poi.apache.org

Reply via email to