1. XWPFParagraph addParagraph()
在這個表格單元格中添加一個段落
2. void addParagraph(XWPFParagraph p)
給這個表格加一段
3. java.util.List<IBodyElement> getBodyElements()
返回包含段落和表的迭代器
4. java.lang.String getColor()
獲取單元格顏色
5. org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc getCTTc()
6. XWPFParagraph getParagraph(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP p)
如果這個表的分段列表中有參數ctTable對應的XWPFParagraph,如果沒有對應的XWPFParagraph,這個方法將返回null
7. XWPFParagraph getParagraphArray(int pos)
返回位置pos的段落
8. java.util.List<XWPFParagraph> getParagraphs()
返回段落列表
9. POIXMLDocumentPart getPart()
10. BodyType getPartType()
獲取主體的PartType,例如DOCUMENT、HEADER、FOOTER、腳注、
11. XWPFTable getTable(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl ctTable)
通過它的cttb對象獲取一個表
12. XWPFTable getTableArray(int pos)
返回pos位置的表
13. XWPFTableCell getTableCell(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc cell)
get the TableCell which belongs to the TableCell
14. XWPFTableRow getTableRow()
15. java.util.List<XWPFTable> getTables()
16. protected org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTcPr getTcPr()
獲取單元格的單元格屬性
17. String getText()
18. String getTextRecursively()
通過嵌入式表和嵌入式sdt遞歸地提取所有文本
19. XWPFTableCell.XWPFVertAlign getVerticalAlignment()
獲取單元格的垂直對齊。
20. int getWidth()
21. double getWidthDecimal()
以十進制值的形式獲取表寬度。
22. TableWidthType getWidthType()
獲取表的width類型,作為STTblWidth。枚舉值
23. XWPFDocument getXWPFDocument()
Return XWPFDocument
24. XWPFParagraph insertNewParagraph(org.apache.xmlbeans.XmlCursor cursor)
在光標位置添加一個新段落
25. XWPFTable insertNewTbl(org.apache.xmlbeans.XmlCursor cursor)
在光標位置插入一個新表。
26. void insertTable(int pos, XWPFTable table)
將現有的XWPFTable插入數組body元素和表
27. void removeParagraph(int pos)
刪除此表格的一段
28 void setColor(java.lang.String rgbStr)
設置顏色
29 void setParagraph(XWPFParagraph p)
30 void setText(java.lang.String text)
31 void setVerticalAlignment(XWPFTableCell.XWPFVertAlign vAlign)
設置單元格的垂直對齊。
32 void setWidth(java.lang.String widthValue)
將寬度設置為值“auto”、整數值(20分之一個點)或百分比(“nn.nn%”)。
33 void setWidthType(TableWidthType widthType)
設置表的寬度值類型。