Overview | Package | Class | Tree | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## application.workbooks.workbook.tables
Class TableAttribute

    java.lang.Object
      application.workbooks.workbook.tables.TableAttribute

public class TableAttribute
extends java.lang.Object

封装了表格属性对话盒的属性类,包括:表格属性、行属性、列属性、单元格属性等。

Method Summary
`void` | `apply()` 使设置的表格、行、列或者单元格的属性设置有效。
`float` | `getCellBottomMargin()` 获得表格单元格下边边距。
`float` | `getCellLeftMargin()` 获得表格单元格左边边距。
`float` | `getCellRightMargin()` 获得表格单元格右边边距。
`float` | `getCellTopMargin()` 获得表格单元格上边边距。
`int` | `getCellVAlignment()` 获得表格单元格的竖直排列方式。
`float` | `getCellWidth()` 获得表格单元格的宽度。
`boolean` | `getCellWidthMeasure()` 获得表格单元格宽度的单位。
`float` | `getColWidth()` 获得表格列的宽度。
`boolean` | `getColWidthMeasure()` 获得表格列宽度的单位。
`float` | `getDefaultCellBottomMargin()` 获得表格默认的单元格下边边距。
`float` | `getDefaultCellLeftMargin()` 获得表格默认的单元格左边边距。
`float` | `getDefaultCellRightMargin()` 获得表格默认的单元格右边边距。
`float` | `getDefaultCellTopMargin()` 获得表格默认的单元格上边边距。
`float` | `getRowHeight()` 获得表格行的高度。
`boolean` | `getRowHeightExact()` 获得的表格行高值是固定值还是最小值。
`boolean` | `getRowRepeatAsHeader()` 判断表格行是否可以重复标题，即当一张表格显示多页时，是否要设置每页的第一行为标题行。
`float` | `getSpaceBetweenCells()` 获得表格默认的单元格间距。
`int` | `getTableAlignment()` 获得表格的对齐方式。
`boolean` | `getTableCellAutoFit()` 获得表格的列宽是否会根据单元格中的内容自动调整宽度。
`float` | `getTableIndentLeft()` 获得表格的左缩进距离。
`float` | `getTableWidth()` 获得表格的宽度。
`boolean` | `getTableWidthMeasure()` 获得表格宽度的单位。
`boolean` | `isCellMarginSameAsTable()` 判断表格单元格各边边距是否取自表格单元格各边默认边距。
`void` | `setCellBottomMargin(float cellBottom)` 设置表格单元格下边边距。
`void` | `setCellLeftMargin(float cellLeft)` 设置表格单元格左边边距。
`void` | `setCellMarginSameAsTable(boolean sameAsTable)` 设置的表格单元格各边边距是否取自表格单元格各边默认边距。
`void` | `setCellRightMargin(float cellRight)` 设置表格单元格右边边距。
`void` | `setCellTopMargin(float cellTop)` 设置表格单元格上边边距。
`void` | `setCellVAlignment(int cellVerticalAlign)` 设置表格单元格的竖直排列方式。
`void` | `setCellWidth(float cellWidth)` 设置表格单元格的宽度。
`void` | `setCellWidthMeasure(boolean unit)` 设置表格单元格宽度的单位。
`void` | `setColWidth(float colWidth)` 设置表格列的宽度。
`void` | `setColWidthMeasure(boolean isFixed)` 设置表格列宽度的单位。
`void` | `setDefaultCellBottomMargin(float cellBottomDef)` 设置表格默认的单元格下边边距。
`void` | `setDefaultCellLeftMargin(float cellLeftDef)` 设置表格默认的单元格左边边距。
`void` | `setDefaultCellRightMargin(float cellRightDef)` 设置表格默认的单元格右边边距。
`void` | `setDefaultCellTopMargin(float cellTopDef)` 设置表格默认的单元格上边边距。
`void` | `setRowHeight(float rowHeight)` 设置表格行的高度。
`void` | `setRowHeightExact(boolean isFixedValue)` 设置表格行高值是固定值还是最小值。
`void` | `setRowRepeatAsHeader(boolean isRepeat)` 设置表格行是否可以重复标题，即当一张表格显示多页时，是否要设置每页的第一行为标题行。
`void` | `setSpaceBetweenCells(float cellSpecingDef)` 设置表格默认的单元格间距。
`void` | `setTableAlignment(int tableAlign)` 设置表格的对齐方式。
`void` | `setTableCellAutoFit(boolean isAutoFit)` 设置表格的列宽是否会根据单元格中的内容自动调整宽度。
`void` | `setTableIndentLeft(float tableLeftIndent)` 设置表格的左缩进距离。
`void` | `setTableWidth(float tableWidth)` 设置表格的宽度。
`void` | `setTableWidthMeasure(boolean tableUnit)` 设置表格宽度的单位。

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### apply

    public void apply()

  使设置的表格、行、列或者单元格的属性设置有效。 注：只有调用此方法后，设置的属性才起作用。

  例子:

       Document doc = Application.getWorkbooks().getActiveDocument();
       Section section = doc.getSection(0);
       BaseText baseText = section.getBaseText();
       Tables tables = baseText.getTables();
       tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
       Table table = tables.getTable(0);
       TableAttribute attr = table.getTableAttribute(0,0,2,2);
       attr.setColWidthMeasure(false);
       attr.setColWidth(30.0f);
       attr.apply();

  See Also:
    `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### getCellBottomMargin

    public float getCellBottomMargin()

  获得表格单元格下边边距。

  Returns:
    float 表格单元格下边边距,其值必须大于等于零 注：单元格下边边距要根据工具/选项/常规中的文档度量单位值来决定，可以是厘米，毫米，磅等

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         System.out.println("表格单元格下边边距为：" + attr.getCellBottomMargin());

  See Also:
    `setCellBottomMargin(float)`, `getDefaultCellBottomMargin()`, `setCellMarginSameAsTable(boolean)`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### getCellLeftMargin

    public float getCellLeftMargin()

  获得表格单元格左边边距。

  Returns:
    float 表格单元格左边边距,其值必须大于等于零 注：单元格左边边距要根据工具/选项/常规中的文档度量单位值来决定，可以是厘米，毫米，磅等

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         System.out.println("表格单元格左边边距为：" + attr.getCellLeftMargin());

  See Also:
    `setCellLeftMargin(float)`, `getDefaultCellLeftMargin()`, `setCellMarginSameAsTable(boolean)`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### getCellRightMargin

    public float getCellRightMargin()

  获得表格单元格右边边距。

  Returns:
    float 表格单元格右边边距,其值必须大于等于零 注：单元格右边边距要根据工具/选项/常规中的文档度量单位值来决定，可以是厘米，毫米，磅等

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         System.out.println("表格单元格右边边距为：" + attr.getCellRightMargin());

  See Also:
    `setCellRightMargin(float)`, `getDefaultCellRightMargin()`, `setCellMarginSameAsTable(boolean)`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### getCellTopMargin

    public float getCellTopMargin()

  获得表格单元格上边边距。

  Returns:
    float 表格单元格上边边距,其值必须大于等于零 注：单元格上边边距要根据工具/选项/常规中的文档度量单位值来决定，可以是厘米，毫米，磅等

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         System.out.println("表格单元格上边边距为：" + attr.getCellTopMargin());

  See Also:
    `setCellTopMargin(float)`, `getDefaultCellTopMargin()`, `setCellMarginSameAsTable(boolean)`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### getCellVAlignment

    public int getCellVAlignment()

  获得表格单元格的竖直排列方式。

  Returns:
    int 单元格的竖直排列方式，只能取以下整形值之一：

                TableConstants.V_TOP      垂直对齐方式为顶端对齐
                TableConstants.V_CENTER   垂直对齐方式为居中对齐
                TableConstants.V_BOTTOM   垂直对齐方式为底端对齐

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         System.out.println("单元格的竖直排列方式为：" + attr.getCellVAlignment());

  See Also:
    `setCellVAlignment(int)`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### getCellWidth

    public float getCellWidth()

  获得表格单元格的宽度。

  Returns:
    float 表格单元格的宽度,其值不能小于零 注：单元格的宽度值根据单元格宽度度量单位决定，当度量单位为true时，则宽度值要根据工具/选项/常规中的 文档度量单位值来决定，可以是厘米，毫米，磅等，否则宽度值为表格宽度与页面当前分栏宽度的百分比

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         System.out.println("表格单元格的宽度为：" + attr.getCellWidth());

  See Also:
    `setCellWidth(float)`, `setCellWidthMeasure(boolean)`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### getCellWidthMeasure

    public boolean getCellWidthMeasure()

  获得表格单元格宽度的单位。

  Returns:
    boolean 布尔值型，单元格宽度的度量单位，如果为true，则设置的宽度值要根据工具/选项/常规中的文档 度量单位值来决定，可以是厘米，毫米，磅等，否则设置的宽度值为表格宽度与页面当前分栏宽度的百分比

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         System.out.println("表格单元格宽度的单位是否为实际宽度：" + attr.getCellWidthMeasure());

  See Also:
    `setCellWidthMeasure(boolean)`, `setCellWidth(float)`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### getColWidth

    public float getColWidth()

  获得表格列的宽度。

  Returns:
    float 表格列的宽度,其值不能小于零 注：表格列的宽度值根据表格列宽度度量单位决定，当度量单位为true时，则宽度值要根据工具/选项/常规中的 文档度量单位值来决定，可以是厘米，毫米，磅等，否则宽度值为表格宽度与页面当前分栏宽度的百分比

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         System.out.println("表格列的宽度为：" + attr.getColWidth());

  See Also:
    `setColWidth(float)`, `setColWidthMeasure(boolean)`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### getColWidthMeasure

    public boolean getColWidthMeasure()

  获得表格列宽度的单位。

  Returns:
    boolean 布尔值型，列宽度的度量单位，如果为true，则设置的宽度值要根据工具/选项/常规中的文档 度量单位值来决定，可以是厘米，毫米，磅等，否则设置的宽度值为表格宽度与页面当前分栏宽度的百分比

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         System.out.println("表格列宽度的单位是否为实际单位："+attr.getColWidthMeasure());

  See Also:
    `setColWidthMeasure(boolean)`, `setColWidth(float)`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### getDefaultCellBottomMargin

    public float getDefaultCellBottomMargin()

  获得表格默认的单元格下边边距。

  Returns:
    float 表格默认的单元格下边边距,其值必须大于等于零 注：单元格下边边距要根据工具/选项/常规中的文档度量单位值来决定，可以是厘米，毫米，磅等

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         System.out.println("单元格下边边距为：" + attr.getDefaultCellBottomMargin());

  See Also:
    `setDefaultCellBottomMargin(float)`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### getDefaultCellLeftMargin

    public float getDefaultCellLeftMargin()

  获得表格默认的单元格左边边距。

  Returns:
    float 表格默认的单元格左边边距,其值必须大于等于零 注：单元格左边边距要根据工具/选项/常规中的文档度量单位值来决定，可以是厘米，毫米，磅等

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         System.out.println("单元格左边边距为：" + attr.getDefaultCellLeftMargin());

  See Also:
    `setDefaultCellLeftMargin(float)`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### getDefaultCellRightMargin

    public float getDefaultCellRightMargin()

  获得表格默认的单元格右边边距。

  Returns:
    float 表格默认的单元格右边边距,其值必须大于等于零 注：单元格右边边距要根据工具/选项/常规中的文档度量单位值来决定，可以是厘米，毫米，磅等

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         System.out.println("单元格右边边距为：" + attr.getDefaultCellRightMargin());

  See Also:
    `setDefaultCellRightMargin(float)`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### getDefaultCellTopMargin

    public float getDefaultCellTopMargin()

  获得表格默认的单元格上边边距。

  Returns:
    float 表格默认的单元格上边边距,其值必须大于等于零 注：单元格上边边距要根据工具/选项/常规中的文档度量单位值来决定，可以是厘米，毫米，磅等

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         System.out.println("单元格上边边距为：" + attr.getDefaultCellTopMargin());

  See Also:
    `setDefaultCellTopMargin(float)`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### getRowHeight

    public float getRowHeight()

  获得表格行的高度。

  Returns:
    float 表格行的高度,其值不能小于零 注：表格行的高度要根据工具/选项/常规中的文档度量单位值来决定，可以是厘米，毫米，磅等

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         System.out.println("表格行的高度为：" + attr.getRowHeight());

  See Also:
    `setRowHeight(float)`, `setRowHeightExact(boolean)`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### getRowHeightExact

    public boolean getRowHeightExact()

  获得的表格行高值是固定值还是最小值。

  Returns:
    boolean 布尔值型，行高值是固定值还是最小值，如果为true，则为固定值，否则为最小值

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         System.out.println("表格行高值是否为固定值：" + attr.getRowHeightExact());

  See Also:
    `setRowHeightExact(boolean)`, `setRowHeight(float)`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### getRowRepeatAsHeader

    public boolean getRowRepeatAsHeader()

  判断表格行是否可以重复标题，即当一张表格显示多页时，是否要设置每页的第一行为标题行。

  Returns:
    boolean 布尔值型，是否显示标题行，如果为true，则显示，否则不显示

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         System.out.println("表格行是否可以重复标题：" + attr.setRowRepeatAsHeader());

  See Also:
    `setRowRepeatAsHeader(boolean)`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### getSpaceBetweenCells

    public float getSpaceBetweenCells()

  获得表格默认的单元格间距。

  Returns:
    float 表格默认的单元格间距,其值必须大于等于零 注：单元格下边边距要根据工具/选项/常规中的文档度量单位值来决定，可以是厘米，毫米，磅等

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         System.out.println("表格默认的单元格间距为：" + attr.getSpaceBetweenCells());

  See Also:
    `setSpaceBetweenCells(float)`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### getTableAlignment

    public int getTableAlignment()

  获得表格的对齐方式。

  Returns:
    int 表格的对齐方式，只能取以下整形值之一：

                TableConstants.LEFT      左对齐
                TableConstants.CENTER    居中对齐
                TableConstants.RIGHT     右对齐

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         System.out.println("表格的对齐方式为：" + attr.getTableAlignment());

  See Also:
    `setTableAlignment(int)`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### getTableCellAutoFit

    public boolean getTableCellAutoFit()

  获得表格的列宽是否会根据单元格中的内容自动调整宽度。

  Returns:
    boolean 布尔值型，如果为true，则列宽会根据单元格中的内容自动调整，否则不会自动调整

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         System.out.println("表格的列宽是否会根据单元格中的内容自动调整：" + attr.getTableCellAutoFit());

  See Also:
    `setTableCellAutoFit(boolean)`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### getTableIndentLeft

    public float getTableIndentLeft()

  获得表格的左缩进距离。

  Returns:
    float 表格的左缩进距离,当其小于零时为突出多少距离 注：表格的左缩进值要根据工具/选项/常规中的文档度量单位值来决定，可以是厘米，毫米，磅等

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         System.out.println("表格的左缩进距离为：" + attr.getTableIndentLeft());

  See Also:
    `setTableIndentLeft(float)`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### getTableWidth

    public float getTableWidth()

  获得表格的宽度。

  Returns:
    float 表格的宽度,必须大于等于零 注：表格的宽度值根据表格宽度度量单位决定，当度量单位为true时，则宽度值要根据工具/选项/常规中的 文档度量单位值来决定，可以是厘米，毫米，磅等，否则宽度值为表格宽度与页面当前分栏宽度的百分比

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         System.out.println("表格的宽度为：" + attr.getTableWidth());

  See Also:
    `setTableWidth(float)`, `setTableWidthMeasure(boolean)`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### getTableWidthMeasure

    public boolean getTableWidthMeasure()

  获得表格宽度的单位。

  Returns:
    boolean 布尔值型，表格宽度的度量单位，如果为true，则设置的宽度值要根据工具/选项/常规中的文档 度量单位值来决定，可以是厘米，毫米，磅等，否则设置的宽度值为表格宽度与页面当前分栏宽度的百分比

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         System.out.println("表格宽度的度量单位是否为百分比值：" + !(attr.getTableWidthMeasure()));

  See Also:
    `setTableWidthMeasure(boolean)`, `setTableWidth(float)`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### isCellMarginSameAsTable

    public boolean isCellMarginSameAsTable()

  判断表格单元格各边边距是否取自表格单元格各边默认边距。

  Returns:
    boolean 布尔值型，设置的单元格各边边距是否取自默认的单元格边距， 如果为true，则取自默认边距，否则，设置的是实际边距

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         System.out.println("表格单元格各边边距是否取自表格单元格各边默认边距：" + attr.isCellMarginSameAsTable());

  See Also:
    `setCellMarginSameAsTable(boolean)`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### setCellBottomMargin

    public void setCellBottomMargin(float cellBottom)

  设置表格单元格下边边距。

  See Also:
    `getCellBottomMargin()`, `setCellLeftMargin(float)`, `setCellRightMargin(float)`, `setCellTopMargin(float)`, `getDefaultCellBottomMargin()`, `setCellMarginSameAsTable(boolean)`, `apply()`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### setCellLeftMargin

    public void setCellLeftMargin(float cellLeft)

  设置表格单元格左边边距。

  See Also:
    `getCellLeftMargin()`, `setCellRightMargin(float)`, `setCellTopMargin(float)`, `setCellBottomMargin(float)`, `getDefaultCellLeftMargin()`, `setCellMarginSameAsTable(boolean)`, `apply()`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### setCellMarginSameAsTable

    public void setCellMarginSameAsTable(boolean sameAsTable)

  设置的表格单元格各边边距是否取自表格单元格各边默认边距。

  Parameters:
    `sameAsTable` - 布尔值型，设置的单元格各边边距是否取自默认的单元格边距， 如果为true，则取自默认边距，否则，设置的是实际边距 注：只有调用了apply()方法，才能使设置的属性有效

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         attr.setCellMarginSameAsTable(false);
         attr.setCellBottomMargin(30.0f);
         attr.apply();

  See Also:
    `isCellMarginSameAsTable()`, `apply()`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### setCellRightMargin

    public void setCellRightMargin(float cellRight)

  设置表格单元格右边边距。

  See Also:
    `getCellRightMargin()`, `setCellLeftMargin(float)`, `setCellTopMargin(float)`, `setCellBottomMargin(float)`, `getDefaultCellRightMargin()`, `setCellMarginSameAsTable(boolean)`, `apply()`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### setCellTopMargin

    public void setCellTopMargin(float cellTop)

  设置表格单元格上边边距。

  See Also:
    `getCellTopMargin()`, `setCellLeftMargin(float)`, `setCellRightMargin(float)`, `setCellBottomMargin(float)`, `getDefaultCellTopMargin()`, `setCellMarginSameAsTable(boolean)`, `apply()`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### setCellVAlignment

    public void setCellVAlignment(int cellVerticalAlign)

  设置表格单元格的竖直排列方式。

  Parameters:
    `cellVerticalAlign` - 单元格的竖直排列方式，只能取以下整形值之一：

                TableConstants.V_TOP      垂直对齐方式为顶端对齐
                TableConstants.V_CENTER   垂直对齐方式为居中对齐
                TableConstants.V_BOTTOM   垂直对齐方式为底端对齐

    注：只有调用了apply()方法，才能使设置的属性有效

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         attr.setCellVAlignment(TableConstants.V_CENTER);
         attr.apply();

  See Also:
    `getCellVAlignment()`, `apply()`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### setCellWidth

    public void setCellWidth(float cellWidth)

  设置表格单元格的宽度。

  Parameters:
    `cellWidth` - 表格单元格的宽度,其值不能小于零 注：单元格的宽度值根据单元格宽度度量单位决定，当度量单位为true时，则宽度值要根据工具/选项/常规中的 文档度量单位值来决定，可以是厘米，毫米，磅等，否则宽度值为表格宽度与页面当前分栏宽度的百分比 注：只有调用了apply()方法，才能使设置的属性有效

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         attr.setCellWidthMeasure(false);
         attr.setCellWidth(40.0f);
         attr.apply();

  See Also:
    `getCellWidth()`, `setCellWidthMeasure(boolean)`, `apply()`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### setCellWidthMeasure

    public void setCellWidthMeasure(boolean unit)

  设置表格单元格宽度的单位。

  Parameters:
    `unit` - 布尔值型，单元格宽度的度量单位，如果为true，则设置的宽度值要根据工具/选项/常规中的文档 度量单位值来决定，可以是厘米，毫米，磅等，否则设置的宽度值为表格宽度与页面当前分栏宽度的百分比 注：只有调用了apply()方法，才能使设置的属性有效

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         attr.setCellWidthMeasure(false);
         attr.setCellWidth(30.0f);
         attr.apply();

  See Also:
    `getCellWidthMeasure()`, `setCellWidth(float)`, `apply()`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### setColWidth

    public void setColWidth(float colWidth)

  设置表格列的宽度。

  Parameters:
    `colWidth` - 表格列的宽度,其值不能小于零 注：表格列的宽度值根据表格列宽度度量单位决定，当度量单位为true时，则宽度值要根据工具/选项/常规中的 文档度量单位值来决定，可以是厘米，毫米，磅等，否则宽度值为表格宽度与页面当前分栏宽度的百分比 注：只有调用了apply()方法，才能使设置的属性有效

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         attr.setColWidthMeasure(false);
         attr.setColWidth(40.0f);
         attr.apply();

  See Also:
    `getColWidth()`, `setColWidthMeasure(boolean)`, `apply()`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### setColWidthMeasure

    public void setColWidthMeasure(boolean isFixed)

  设置表格列宽度的单位。

  See Also:
    `getColWidthMeasure()`, `setColWidth(float)`, `apply()`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### setDefaultCellBottomMargin

    public void setDefaultCellBottomMargin(float cellBottomDef)

  设置表格默认的单元格下边边距。

  See Also:
    `getDefaultCellBottomMargin()`, `setDefaultCellLeftMargin(float)`, `setDefaultCellRightMargin(float)`, `setDefaultCellTopMargin(float)`, `apply()`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### setDefaultCellLeftMargin

    public void setDefaultCellLeftMargin(float cellLeftDef)

  设置表格默认的单元格左边边距。

  Parameters:
    `cellLeftDef` - 表格默认的单元格左边边距,其值必须大于等于零 注：单元格左边边距要根据工具/选项/常规中的文档度量单位值来决定，可以是厘米，毫米，磅等 注：只有调用了apply()方法，才能使设置的属性有效

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         attr.setDefaultCellLeftMargin(30.0f);
         attr.apply();

  See Also:
    `getDefaultCellLeftMargin()`, `setDefaultCellRightMargin(float)`, `setDefaultCellTopMargin(float)`, `setDefaultCellBottomMargin(float)`, `apply()`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### setDefaultCellRightMargin

    public void setDefaultCellRightMargin(float cellRightDef)

  设置表格默认的单元格右边边距。

  See Also:
    `getDefaultCellRightMargin()`, `setDefaultCellLeftMargin(float)`, `setDefaultCellTopMargin(float)`, `setDefaultCellBottomMargin(float)`, `apply()`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### setDefaultCellTopMargin

    public void setDefaultCellTopMargin(float cellTopDef)

  设置表格默认的单元格上边边距。

  See Also:
    `getDefaultCellTopMargin()`, `setDefaultCellLeftMargin(float)`, `setDefaultCellRightMargin(float)`, `setDefaultCellBottomMargin(float)`, `apply()`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### setRowHeight

    public void setRowHeight(float rowHeight)

  设置表格行的高度。

  Parameters:
    `rowHeight` - 表格行的高度,其值不能小于零 注：表格行的高度要根据工具/选项/常规中的文档度量单位值来决定，可以是厘米，毫米，磅等 注：只有调用了apply()方法，才能使设置的属性有效

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         attr.setRowHeightExact(true);
         attr.setRowHeight(40.0f);
         attr.apply();

  See Also:
    `getRowHeight()`, `setRowHeightExact(boolean)`, `apply()`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### setRowHeightExact

    public void setRowHeightExact(boolean isFixedValue)

  设置表格行高值是固定值还是最小值。

  Parameters:
    `isFixedValue` - 布尔值型，行高值是固定值还是最小值，如果为true，则为固定值，否则为最小值 注：只有调用了apply()方法，才能使设置的属性有效

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         attr.setRowHeightExact(true);
         attr.setRowHeight(40.0f);
         attr.apply();

  See Also:
    `getRowHeightExact()`, `setRowHeight(float)`, `apply()`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### setRowRepeatAsHeader

    public void setRowRepeatAsHeader(boolean isRepeat)

  设置表格行是否可以重复标题，即当一张表格显示多页时，是否要设置每页的第一行为标题行。

  Parameters:
    `isRepeat` - 布尔值型，是否显示标题行，如果为true，则显示，否则不显示 注：只有调用了apply()方法，才能使设置的属性有效

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         attr.setRowRepeatAsHeader(true);
         attr.apply();

  See Also:
    `getRowRepeatAsHeader()`, `apply()`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### setSpaceBetweenCells

    public void setSpaceBetweenCells(float cellSpecingDef)

  设置表格默认的单元格间距。

  Parameters:
    `cellSpecingDef` - 表格默认的单元格间距,其值必须大于等于零 注：单元格下边边距要根据工具/选项/常规中的文档度量单位值来决定，可以是厘米，毫米，磅等 注：只有调用了apply()方法，才能使设置的属性有效

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         attr.setSpaceBetweenCells(10.0f);
         attr.apply();

  See Also:
    `getSpaceBetweenCells()`, `apply()`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### setTableAlignment

    public void setTableAlignment(int tableAlign)

  设置表格的对齐方式。

  Parameters:
    `tableAlign` - 表格的对齐方式，只能取以下整形值之一：

                TableConstants.LEFT      左对齐
                TableConstants.CENTER    居中对齐
                TableConstants.RIGHT     右对齐

    注：只有调用了apply()方法，才能使设置的属性有效

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         attr.setTableAlignment(TableConstants.CENTER);
         attr.apply();

  See Also:
    `getTableAlignment()`, `apply()`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### setTableCellAutoFit

    public void setTableCellAutoFit(boolean isAutoFit)

  设置表格的列宽是否会根据单元格中的内容自动调整宽度。

  Parameters:
    `isAutoFit` - 布尔值型，如果为true，则列宽会根据单元格中的内容自动调整，否则不会自动调整 注：只有调用了apply()方法，才能使设置的属性有效

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         attr.setTableCellAutoFit(true);
         attr.apply();

  See Also:
    `getTableCellAutoFit()`, `apply()`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### setTableIndentLeft

    public void setTableIndentLeft(float tableLeftIndent)

  设置表格的左缩进距离。

  Parameters:
    `tableLeftIndent` - 表格的左缩进距离,当其小于零时为突出多少距离 注：表格的左缩进值要根据工具/选项/常规中的文档度量单位值来决定，可以是厘米，毫米，磅等 注：只有调用了apply()方法，才能使设置的属性有效

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         attr.setTableIndentLeft(20.0f);
         attr.apply();

  See Also:
    `getTableIndentLeft()`, `apply()`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### setTableWidth

    public void setTableWidth(float tableWidth)

  设置表格的宽度。

  Parameters:
    `tableWidth` - 表格的宽度,必须大于等于零 注：表格的宽度值根据表格宽度度量单位决定，当度量单位为true时，则宽度值要根据工具/选项/常规中的 文档度量单位值来决定，可以是厘米，毫米，磅等，否则宽度值为表格宽度与页面当前分栏宽度的百分比 注：只有调用了apply()方法，才能使设置的属性有效

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         attr.setTableWidthMeasure(false);
         attr.setTableWidth(100.0f);
         System.out.println("表格的宽度为：" + attr.getTableWidth());

  See Also:
    `getTableWidth()`, `setTableWidthMeasure(boolean)`, `apply()`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

### setTableWidthMeasure

    public void setTableWidthMeasure(boolean tableUnit)

  设置表格宽度的单位。

  Parameters:
    `tableUnit` - 布尔值型，表格宽度的度量单位，如果为true，则设置的宽度值要根据工具/选项/常规中的文档 度量单位值来决定，可以是厘米，毫米，磅等，否则设置的宽度值为表格宽度与页面当前分栏宽度的百分比 注：只有调用了apply()方法，才能使设置的属性有效

    例子:

         Document doc = Application.getWorkbooks().getActiveDocument();
         Section section = doc.getSection(0);
         BaseText baseText = section.getBaseText();
         Tables tables = baseText.getTables();
         tables.insertTable(0,5,5,TableConstants.FIXED_COLUMN_WIDTH,-30.0f);
         Table table = tables.getTable(0);
         TableAttribute attr = table.getTableAttribute(0,0,2,2);
         attr.setTableWidthMeasure(false);
         attr.setTableWidth(50.0f);
         attr.apply();

  See Also:
    `setTableWidthMeasure(boolean)`, `setTableWidth(float)`, `apply()`, `application.workbooks.workbook.tables.Table.getTableAttribute(int,int,int,int)`, `Table`, `application.workbooks.workbook.Tables.getTable(long)`, `application.workbooks.workbook.documents.document.section.AbstractText.getTables()`

Overview | Package | Class | Tree | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

版权所有 2001-2004 无锡永中科技有限公司