POI的XWPFTable的方法总结

博客介绍了一系列Java表格操作方法,包括添加新列、新行,创建行对象,以及获取表格边框(底部、水平、垂直、左边框)的颜色、大小、间距和类型等,还能获取单元格边距、列带大小和表的类型。

1、  void   addNewCol();

        为该表中的每一行添加一个新列

2、  void  addRow(XWPFTableRow row);

        向表中添加新行

3、  boolean  addRow(XWPFTableRow row, int pos);

        在pos位置向表添加新行

4、  XWPFTableRow  createRow();

        创建一个新的XWPFTableRow对象,该对象的单元格数与当时定义的列数相同

5、  java.lang.String   getBottomBorderColor();

        获取底部边框颜色

6、  int    getBottomBorderSize();

        获取底部边框大小

7、  int  getBottomBorderSpace();

        获取底部边框间距

8、  XWPFTable.XWPFBorderType  getBottomBorderType();

        获取底部边框类型

9、  int   getCellMarginBottom();

10、  int  getCellMarginBottom();

11、  int  getCellMarginLeft();

12、  int  getCellMarginRight();

13、  int  getCellMarginTop();

14、  int  getColBandSize();

15、  BodyElementType  getElementType()

        返回BodyElement表的类型

16、  java.lang.String  getInsideHBorderColor()

        获取水平边框颜色

17、  int  getInsideHBorderSize();

        获取水平边框大小

18、  int  getInsideHBorderSpace();

        获取水平边框间距

19、  XWPFTable.XWPFBorderType  getInsideHBorderType()

        获取水平边框类型

20、  java.lang.String  getInsideVBorderColor()

        获取垂直边框颜色

21、  int  getInsideVBorderSize();

        获取垂直边框大小

22、  int  getInsideVBorderSpace();

        获取垂直边框间距

23、  XWPFTable.XWPFBorderType  getInsideVBorderType()

        获取垂直边框类型

24、  java.lang.String  getLeftBorderColor()

        获取左边框颜色

        

 

转载于:https://www.cnblogs.com/zyc-blogs/p/10558859.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值