类的使用
org.anyline.office.docx.entity.Wtable
使用Wtable的程序包
-
org.anyline.office.docx.entity中Wtable的使用
修饰符和类型方法说明Wtable.addColumns(int qty) 追加列, 每一行追加,追加的列将复制前一列的样式(背景色、字体等)Wtable.addRows(int qty) 追加qty行Wtable.addRows(int index, int qty) 追加行,追加的行将复制上一行的样式(背景色、字体等)Wtable.append(int qty) Wtable.copy()Wtr.getParent()Wtable.insert(int qty) 在最后位置插入qty行,以最后一行为模板在index位置插入qty行,以原来index位置行为模板,原来index位置以下行的挤到下一行在index位置插入行,原来index位置的行被挤到下一行,以template为模板Wtable.insertColumns(int col, int qty) 插入列 追加的列将复制前一列的样式(背景色、字体等) 如果col=0则将制后一列的样式(背景色、字体等)Wtable.insertRows(Integer index, int qty) 追加行,追加的行将复制上一行的样式(背景色、字体等)Wtable.insertRows(Wtr template, Integer index, int qty) 以template为模板 在index位置插入qty行,以原来index位置行为模板,原来index位置以下行的挤到下一行Wtable.merge(int row, int col, int rowspan, int colspan) 合并行列Wtable.removeBackgroundColor()Wtable.removeBorder()Wtable.removeBottomBorder()清除表格下边框Wtable.removeColor()Wtable.removeInsideHBorder()清除表格水平边框Wtable.removeInsideVBorder()清除表格垂直边框Wtable.removeLeftBorder()清除表格左边框Wtable.removeLeftBorder(int col) 删除整列的左边框Wtable.removeRightBorder()清除表格右边框Wtable.removeRightBorder(int col) 删除整列的右边框Wtable.removeStyle()Wtable.removeTcBackgroundColor()清除所有单元格背景色Wtable.removeTcBorder()清除所有单元格边框Wtable.removeTcColor()清除所有单元格颜色Wtable.removeTl2brBorder()Wtable.removeTopBorder()清除表格上边框Wtable.removeTr2blBorder()设置整个表格单元格内容水平对齐方式Wtable.setBackgroundColor(String color) Wtable.setBold()Wtable.setBold(boolean bold) Wtable.setBottomPadding(double padding) Wtable.setBottomPadding(int padding) Wtable.setBottomPadding(String padding) 设置整个表格中所有单元格下边距Wtable.setCellBorder()设置所有单元格默认边框设置row行col列的文本 支持html标签Wtable.setItalic()Wtable.setItalic(boolean italic) Wtable.setLeftBorder(int cols, int size, String color, String style) 设置所有行指定列的左边框Wtable.setLeftPadding(double padding) Wtable.setLeftPadding(int padding) Wtable.setLeftPadding(String padding) Wtable.setPadding(double padding) Wtable.setPadding(int padding) Wtable.setPadding(String padding) Wtable.setPadding(String side, double padding) Wtable.setPadding(String side, int padding) Wtable.setPadding(String side, String padding) Wtable.setRightBorder(int cols, int size, String color, String style) 设置所有行指定列的右边框Wtable.setRightPadding(double padding) Wtable.setRightPadding(int padding) Wtable.setRightPadding(String padding) Wtable.setStrike()Wtable.setStrike(boolean strike) 设置row行col列的文本设置row行col列的文本 并设置样式Wtable.setTopPadding(double padding) Wtable.setTopPadding(int padding) Wtable.setTopPadding(String padding) Wtable.setVerticalAlign(String align) 设置整个表格单元格内容垂直对齐方式Wtable.setWidth(double width) 设置表格宽度 默认pxWtable.setWidth(int width) 设置表格宽度 默认pxWtable.setWidth(int cols, double width) Wtable.setWidth(int cols, int width) 设置整列宽度返回变量类型为Wtable的类型的org.anyline.office.docx.entity中的方法参数类型为Wtable的org.anyline.office.docx.entity中的方法修饰符和类型方法说明org.dom4j.Elementorg.dom4j.Elementorg.dom4j.Elementorg.dom4j.Element参数类型为Wtable的org.anyline.office.docx.entity中的构造器