org.apache.poi.xwpf.usermodel

## Class XWPFTable

- java.lang.Object
- - org.apache.poi.xwpf.usermodel.XWPFTable

- All Implemented Interfaces:
    IBodyElement, ISDTContents

      public class XWPFTable
      extends java.lang.Object
      implements IBodyElement, ISDTContents

  Sketch of XWPFTable class. Only table's text is being hold.

  Specifies the contents of a table present in the document. A table is a set of paragraphs (and other block-level content) arranged in rows and columns.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `XWPFTable.XWPFBorderType`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `DEFAULT_PERCENTAGE_WIDTH`
    `protected IBody` | `part`
    `static java.lang.String` | `REGEX_PERCENTAGE`
    `static java.lang.String` | `REGEX_WIDTH_VALUE`
    `protected java.util.List<XWPFTableRow>` | `tableRows`
    `protected java.lang.StringBuilder` | `text`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XWPFTable(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl table, IBody part)`
    `XWPFTable(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl table, IBody part, int row, int col)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addNewCol()` add a new column for each row in this table
    `void` | `addNewRowBetween(int start, int end)` Deprecated. 4.0.0 due to lack of implementation.
    `void` | `addRow(XWPFTableRow row)` add a new Row to the table
    `boolean` | `addRow(XWPFTableRow row, int pos)` add a new Row to the table at position pos
    `XWPFTableRow` | `createRow()` create a new XWPFTableRow object with as many cells as the number of columns defined in that moment
    `IBody` | `getBody()`
    `java.lang.String` | `getBottomBorderColor()` Get bottom border color
    `int` | `getBottomBorderSize()` Get bottom border size
    `int` | `getBottomBorderSpace()` Get bottom border spacing
    `XWPFTable.XWPFBorderType` | `getBottomBorderType()` Get bottom border type
    `int` | `getCellMarginBottom()`
    `int` | `getCellMarginLeft()`
    `int` | `getCellMarginRight()`
    `int` | `getCellMarginTop()`
    `int` | `getColBandSize()`
    `org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl` | `getCTTbl()`
    `BodyElementType` | `getElementType()` returns the type of the BodyElement Table
    `java.lang.String` | `getInsideHBorderColor()` Get inside horizontal border color
    `int` | `getInsideHBorderSize()` Get inside horizontal border size
    `int` | `getInsideHBorderSpace()` Get inside horizontal border spacing
    `XWPFTable.XWPFBorderType` | `getInsideHBorderType()` Get inside horizontal border type
    `java.lang.String` | `getInsideVBorderColor()` Get inside vertical border color
    `int` | `getInsideVBorderSize()` Get inside vertical border size
    `int` | `getInsideVBorderSpace()` Get inside vertical border spacing
    `XWPFTable.XWPFBorderType` | `getInsideVBorderType()` Get inside vertical border type
    `java.lang.String` | `getLeftBorderColor()` Get Left border color
    `int` | `getLeftBorderSize()` Get Left border size
    `int` | `getLeftBorderSpace()` Get Left border spacing
    `XWPFTable.XWPFBorderType` | `getLeftBorderType()` Get Left border type
    `int` | `getNumberOfRows()`
    `POIXMLDocumentPart` | `getPart()` returns the part of the bodyElement
    `BodyType` | `getPartType()` returns the partType of the bodyPart which owns the bodyElement
    `java.lang.String` | `getRightBorderColor()` Get Right border color
    `int` | `getRightBorderSize()` Get Right border size
    `int` | `getRightBorderSpace()` Get Right border spacing
    `XWPFTable.XWPFBorderType` | `getRightBorderType()` Get Right border type
    `XWPFTableRow` | `getRow(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRow row)` returns the XWPFRow which belongs to the CTRow row if this row is not existing in the table null will be returned
    `XWPFTableRow` | `getRow(int pos)`
    `int` | `getRowBandSize()`
    `java.util.List<XWPFTableRow>` | `getRows()`
    `java.lang.String` | `getStyleID()` get the StyleID of the table
    `TableRowAlign` | `getTableAlignment()` Returns the current table alignment or NULL
    `java.lang.String` | `getText()` Convenience method to extract text in cells.
    `java.lang.String` | `getTopBorderColor()` Get top border color
    `int` | `getTopBorderSize()` Get top border size
    `int` | `getTopBorderSpace()` Get top border spacing
    `XWPFTable.XWPFBorderType` | `getTopBorderType()` Get top border type
    `int` | `getWidth()` Get the width value as an integer.
    `double` | `getWidthDecimal()` Get the table width as a decimal value.
    `protected static double` | `getWidthDecimal(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth ctWidth)` Get the width as a decimal value.
    `TableWidthType` | `getWidthType()` Get the width type for the table, as an `STTblWidth.Enum` value.
    `protected static TableWidthType` | `getWidthType(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth ctWidth)` Get the width type from the width value
    `XWPFTableRow` | `insertNewTableRow(int pos)` inserts a new tablerow
    `void` | `removeBorders()` Remove all borders from table
    `void` | `removeBottomBorder()` Remove bottom borders for table
    `void` | `removeInsideHBorder()` Remove inside horizontal borders for table
    `void` | `removeInsideVBorder()` Remove inside vertical borders for table
    `void` | `removeLeftBorder()` Remove left borders for table
    `void` | `removeRightBorder()` Remove right borders for table
    `boolean` | `removeRow(int pos)` Remove a row at position pos from the table
    `void` | `removeTableAlignment()` Removes the table alignment attribute from a table
    `void` | `removeTopBorder()` Remove top borders for table
    `void` | `setBottomBorder(XWPFTable.XWPFBorderType type, int size, int space, java.lang.String rgbColor)` Set Bottom borders for table
    `void` | `setCellMargins(int top, int left, int bottom, int right)`
    `void` | `setColBandSize(int size)`
    `void` | `setInsideHBorder(XWPFTable.XWPFBorderType type, int size, int space, java.lang.String rgbColor)` Set Inside horizontal borders for a table
    `void` | `setInsideVBorder(XWPFTable.XWPFBorderType type, int size, int space, java.lang.String rgbColor)` Set Inside Vertical borders for table
    `void` | `setLeftBorder(XWPFTable.XWPFBorderType type, int size, int space, java.lang.String rgbColor)` Set Left borders for table
    `void` | `setRightBorder(XWPFTable.XWPFBorderType type, int size, int space, java.lang.String rgbColor)` Set Right borders for table
    `void` | `setRowBandSize(int size)`
    `void` | `setStyleID(java.lang.String styleName)` Set the table style.
    `void` | `setTableAlignment(TableRowAlign tra)` Set table alignment to specified `TableRowAlign`
    `void` | `setTopBorder(XWPFTable.XWPFBorderType type, int size, int space, java.lang.String rgbColor)` Set Top borders for table
    `void` | `setWidth(int width)` Set the width in 20ths of a point (twips).
    `void` | `setWidth(java.lang.String widthValue)` Set the width to the value "auto", an integer value (20ths of a point), or a percentage ("nn.nn%").
    `protected static void` | `setWidthPercentage(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth ctWidth, java.lang.String widthValue)` Set the underlying table width value to a percentage value.
    `void` | `setWidthType(TableWidthType widthType)` Set the width value type for the table.
    `protected static void` | `setWidthType(TableWidthType widthType, org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth ctWidth)` Set the width type if different from current width type
    `protected static void` | `setWidthValue(java.lang.String widthValue, org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth ctWidth)` Set the width value from a string

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### REGEX_PERCENTAGE

          public static final java.lang.String REGEX_PERCENTAGE

      See Also:
        Constant Field Values

    - #### DEFAULT_PERCENTAGE_WIDTH

          public static final java.lang.String DEFAULT_PERCENTAGE_WIDTH

      See Also:
        Constant Field Values

    - #### REGEX_WIDTH_VALUE

          public static final java.lang.String REGEX_WIDTH_VALUE

      See Also:
        Constant Field Values

    - #### text

          protected java.lang.StringBuilder text

    - #### tableRows

          protected final java.util.List<XWPFTableRow> tableRows

    - #### part

          protected IBody part

  - ### Constructor Detail

    - #### XWPFTable

          public XWPFTable(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl table,
                           IBody part,
                           int row,
                           int col)

    - #### XWPFTable

          public XWPFTable(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl table,
                           IBody part)

  - ### Method Detail

    - #### getCTTbl

          @Internal
          public org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl getCTTbl()

      Returns:
        ctTbl object

    - #### getText

          public java.lang.String getText()

      Convenience method to extract text in cells. This does not extract text recursively in cells, and it does not currently include text in SDT (form) components.

      To get all text within a table, see XWPFWordExtractor's appendTableText as an example.

      Returns:
        text

    - #### addNewRowBetween

          @Deprecated
           @Removal
           @NotImplemented
          public void addNewRowBetween(int start,
                                                                              int end)

      Deprecated. 4.0.0 due to lack of implementation.
      This method has existed since 2008 without an implementation. It will be removed unless an implementation is provided.

    - #### addNewCol

          public void addNewCol()

      add a new column for each row in this table

    - #### createRow

          public XWPFTableRow createRow()

      create a new XWPFTableRow object with as many cells as the number of columns defined in that moment
      Returns:
        tableRow

    - #### getRow

          public XWPFTableRow getRow(int pos)

      Parameters:
        `pos` - - index of the row
      Returns:
        the row at the position specified or null if no rows is defined or if the position is greather than the max size of rows array

    - #### getWidth

          public int getWidth()

      Get the width value as an integer.

      If the width type is AUTO, DXA, or NIL, the value is 20ths of a point. If the width type is PCT, the value is the percentage times 50 (e.g., 2500 for 50%).

      Returns:
        width value as an integer

    - #### setWidth

          public void setWidth(int width)

      Set the width in 20ths of a point (twips).
      Parameters:
        `width` - Width value (20ths of a point)

    - #### getNumberOfRows

          public int getNumberOfRows()

      Returns:
        number of rows in table

    - #### getTableAlignment

          public TableRowAlign getTableAlignment()

      Returns the current table alignment or NULL
      Returns:
        Table Alignment as a `TableRowAlign` enum

    - #### setTableAlignment

          public void setTableAlignment(TableRowAlign tra)

      Set table alignment to specified `TableRowAlign`
      Parameters:
        `tra` - `TableRowAlign` to set

    - #### removeTableAlignment

          public void removeTableAlignment()

      Removes the table alignment attribute from a table

    - #### getStyleID

          public java.lang.String getStyleID()

      get the StyleID of the table
      Returns:
        style-ID of the table

    - #### setStyleID

          public void setStyleID(java.lang.String styleName)

      Set the table style. If the style is not defined in the document, MS Word will set the table style to "Normal".
      Parameters:
        `styleName` - - the style name to apply to this table

    - #### getInsideHBorderType

          public XWPFTable.XWPFBorderType getInsideHBorderType()

      Get inside horizontal border type
      Returns:
        `XWPFTable.XWPFBorderType` of the inside horizontal borders or null if missing

    - #### getInsideHBorderSize

          public int getInsideHBorderSize()

      Get inside horizontal border size
      Returns:
        The width of the Inside Horizontal borders in 1/8th points, -1 if missing.

    - #### getInsideHBorderSpace

          public int getInsideHBorderSpace()

      Get inside horizontal border spacing
      Returns:
        The offset to the Inside Horizontal borders in points, -1 if missing.

    - #### getInsideHBorderColor

          public java.lang.String getInsideHBorderColor()

      Get inside horizontal border color
      Returns:
        The color of the Inside Horizontal borders, null if missing.

    - #### getInsideVBorderType

          public XWPFTable.XWPFBorderType getInsideVBorderType()

      Get inside vertical border type
      Returns:
        `XWPFTable.XWPFBorderType` of the inside vertical borders or null if missing

    - #### getInsideVBorderSize

          public int getInsideVBorderSize()

      Get inside vertical border size
      Returns:
        The width of the Inside vertical borders in 1/8th points, -1 if missing.

    - #### getInsideVBorderSpace

          public int getInsideVBorderSpace()

      Get inside vertical border spacing
      Returns:
        The offset to the Inside vertical borders in points, -1 if missing.

    - #### getInsideVBorderColor

          public java.lang.String getInsideVBorderColor()

      Get inside vertical border color
      Returns:
        The color of the Inside vertical borders, null if missing.

    - #### getTopBorderType

          public XWPFTable.XWPFBorderType getTopBorderType()

      Get top border type
      Returns:
        `XWPFTable.XWPFBorderType` of the top borders or null if missing

    - #### getTopBorderSize

          public int getTopBorderSize()

      Get top border size
      Returns:
        The width of the top borders in 1/8th points, -1 if missing.

    - #### getTopBorderSpace

          public int getTopBorderSpace()

      Get top border spacing
      Returns:
        The offset to the top borders in points, -1 if missing.

    - #### getTopBorderColor

          public java.lang.String getTopBorderColor()

      Get top border color
      Returns:
        The color of the top borders, null if missing.

    - #### getBottomBorderType

          public XWPFTable.XWPFBorderType getBottomBorderType()

      Get bottom border type
      Returns:
        `XWPFTable.XWPFBorderType` of the bottom borders or null if missing

    - #### getBottomBorderSize

          public int getBottomBorderSize()

      Get bottom border size
      Returns:
        The width of the bottom borders in 1/8th points, -1 if missing.

    - #### getBottomBorderSpace

          public int getBottomBorderSpace()

      Get bottom border spacing
      Returns:
        The offset to the bottom borders in points, -1 if missing.

    - #### getBottomBorderColor

          public java.lang.String getBottomBorderColor()

      Get bottom border color
      Returns:
        The color of the bottom borders, null if missing.

    - #### getLeftBorderType

          public XWPFTable.XWPFBorderType getLeftBorderType()

      Get Left border type
      Returns:
        `XWPFTable.XWPFBorderType` of the Left borders or null if missing

    - #### getLeftBorderSize

          public int getLeftBorderSize()

      Get Left border size
      Returns:
        The width of the Left borders in 1/8th points, -1 if missing.

    - #### getLeftBorderSpace

          public int getLeftBorderSpace()

      Get Left border spacing
      Returns:
        The offset to the Left borders in points, -1 if missing.

    - #### getLeftBorderColor

          public java.lang.String getLeftBorderColor()

      Get Left border color
      Returns:
        The color of the Left borders, null if missing.

    - #### getRightBorderType

          public XWPFTable.XWPFBorderType getRightBorderType()

      Get Right border type
      Returns:
        `XWPFTable.XWPFBorderType` of the Right borders or null if missing

    - #### getRightBorderSize

          public int getRightBorderSize()

      Get Right border size
      Returns:
        The width of the Right borders in 1/8th points, -1 if missing.

    - #### getRightBorderSpace

          public int getRightBorderSpace()

      Get Right border spacing
      Returns:
        The offset to the Right borders in points, -1 if missing.

    - #### getRightBorderColor

          public java.lang.String getRightBorderColor()

      Get Right border color
      Returns:
        The color of the Right borders, null if missing.

    - #### getRowBandSize

          public int getRowBandSize()

    - #### setRowBandSize

          public void setRowBandSize(int size)

    - #### getColBandSize

          public int getColBandSize()

    - #### setColBandSize

          public void setColBandSize(int size)

    - #### setInsideHBorder

          public void setInsideHBorder(XWPFTable.XWPFBorderType type,
                                       int size,
                                       int space,
                                       java.lang.String rgbColor)

      Set Inside horizontal borders for a table
      Parameters:
        `type` - - `XWPFTable.XWPFBorderType` e.g. single, double, thick
        `size` - - Specifies the width of the current border. The width of this border is specified in measurements of eighths of a point, with a minimum value of two (onefourth of a point) and a maximum value of 96 (twelve points). Any values outside this range may be reassigned to a more appropriate value.
        `space` - - Specifies the spacing offset that shall be used to place this border on the table
        `rgbColor` - - This color may either be presented as a hex value (in RRGGBB format), or auto to allow a consumer to automatically determine the border color as appropriate.

    - #### setInsideVBorder

          public void setInsideVBorder(XWPFTable.XWPFBorderType type,
                                       int size,
                                       int space,
                                       java.lang.String rgbColor)

      Set Inside Vertical borders for table
      Parameters:
        `type` - - `XWPFTable.XWPFBorderType` e.g. single, double, thick
        `size` - - Specifies the width of the current border. The width of this border is specified in measurements of eighths of a point, with a minimum value of two (onefourth of a point) and a maximum value of 96 (twelve points). Any values outside this range may be reassigned to a more appropriate value.
        `space` - - Specifies the spacing offset that shall be used to place this border on the table
        `rgbColor` - - This color may either be presented as a hex value (in RRGGBB format), or auto to allow a consumer to automatically determine the border color as appropriate.

    - #### setTopBorder

          public void setTopBorder(XWPFTable.XWPFBorderType type,
                                   int size,
                                   int space,
                                   java.lang.String rgbColor)

      Set Top borders for table
      Parameters:
        `type` - - `XWPFTable.XWPFBorderType` e.g. single, double, thick
        `size` - - Specifies the width of the current border. The width of this border is specified in measurements of eighths of a point, with a minimum value of two (onefourth of a point) and a maximum value of 96 (twelve points). Any values outside this range may be reassigned to a more appropriate value.
        `space` - - Specifies the spacing offset that shall be used to place this border on the table
        `rgbColor` - - This color may either be presented as a hex value (in RRGGBB format), or auto to allow a consumer to automatically determine the border color as appropriate.

    - #### setBottomBorder

          public void setBottomBorder(XWPFTable.XWPFBorderType type,
                                      int size,
                                      int space,
                                      java.lang.String rgbColor)

      Set Bottom borders for table
      Parameters:
        `type` - - `XWPFTable.XWPFBorderType` e.g. single, double, thick
        `size` - - Specifies the width of the current border. The width of this border is specified in measurements of eighths of a point, with a minimum value of two (onefourth of a point) and a maximum value of 96 (twelve points). Any values outside this range may be reassigned to a more appropriate value.
        `space` - - Specifies the spacing offset that shall be used to place this border on the table
        `rgbColor` - - This color may either be presented as a hex value (in RRGGBB format), or auto to allow a consumer to automatically determine the border color as appropriate.

    - #### setLeftBorder

          public void setLeftBorder(XWPFTable.XWPFBorderType type,
                                    int size,
                                    int space,
                                    java.lang.String rgbColor)

      Set Left borders for table
      Parameters:
        `type` - - `XWPFTable.XWPFBorderType` e.g. single, double, thick
        `size` - - Specifies the width of the current border. The width of this border is specified in measurements of eighths of a point, with a minimum value of two (onefourth of a point) and a maximum value of 96 (twelve points). Any values outside this range may be reassigned to a more appropriate value.
        `space` - - Specifies the spacing offset that shall be used to place this border on the table
        `rgbColor` - - This color may either be presented as a hex value (in RRGGBB format), or auto to allow a consumer to automatically determine the border color as appropriate.

    - #### setRightBorder

          public void setRightBorder(XWPFTable.XWPFBorderType type,
                                     int size,
                                     int space,
                                     java.lang.String rgbColor)

      Set Right borders for table
      Parameters:
        `type` - - `XWPFTable.XWPFBorderType` e.g. single, double, thick
        `size` - - Specifies the width of the current border. The width of this border is specified in measurements of eighths of a point, with a minimum value of two (onefourth of a point) and a maximum value of 96 (twelve points). Any values outside this range may be reassigned to a more appropriate value.
        `space` - - Specifies the spacing offset that shall be used to place this border on the table
        `rgbColor` - - This color may either be presented as a hex value (in RRGGBB format), or auto to allow a consumer to automatically determine the border color as appropriate.

    - #### removeInsideHBorder

          public void removeInsideHBorder()

      Remove inside horizontal borders for table

    - #### removeInsideVBorder

          public void removeInsideVBorder()

      Remove inside vertical borders for table

    - #### removeTopBorder

          public void removeTopBorder()

      Remove top borders for table

    - #### removeBottomBorder

          public void removeBottomBorder()

      Remove bottom borders for table

    - #### removeLeftBorder

          public void removeLeftBorder()

      Remove left borders for table

    - #### removeRightBorder

          public void removeRightBorder()

      Remove right borders for table

    - #### removeBorders

          public void removeBorders()

      Remove all borders from table

    - #### getCellMarginTop

          public int getCellMarginTop()

    - #### getCellMarginLeft

          public int getCellMarginLeft()

    - #### getCellMarginBottom

          public int getCellMarginBottom()

    - #### getCellMarginRight

          public int getCellMarginRight()

    - #### setCellMargins

          public void setCellMargins(int top,
                                     int left,
                                     int bottom,
                                     int right)

    - #### addRow

          public void addRow(XWPFTableRow row)

      add a new Row to the table
      Parameters:
        `row` - the row which should be added

    - #### addRow

          public boolean addRow(XWPFTableRow row,
                                int pos)

      add a new Row to the table at position pos
      Parameters:
        `row` - the row which should be added

    - #### insertNewTableRow

          public XWPFTableRow insertNewTableRow(int pos)

      inserts a new tablerow
      Parameters:
        `pos` -
      Returns:
        the inserted row

    - #### removeRow

          public boolean removeRow(int pos)
                            throws java.lang.IndexOutOfBoundsException

      Remove a row at position pos from the table
      Parameters:
        `pos` - position the Row in the Table
      Throws:
        `java.lang.IndexOutOfBoundsException`

    - #### getRows

          public java.util.List<XWPFTableRow> getRows()

    - #### getElementType

          public BodyElementType getElementType()

      returns the type of the BodyElement Table
      Specified by:
        `getElementType` in interface `IBodyElement`
      See Also:
        `IBodyElement.getElementType()`

    - #### getBody

          public IBody getBody()

      Specified by:
        `getBody` in interface `IBodyElement`

    - #### getPart

          public POIXMLDocumentPart getPart()

      returns the part of the bodyElement
      Specified by:
        `getPart` in interface `IBodyElement`
      See Also:
        `IBody.getPart()`

    - #### getPartType

          public BodyType getPartType()

      returns the partType of the bodyPart which owns the bodyElement
      Specified by:
        `getPartType` in interface `IBodyElement`
      See Also:
        `IBody.getPartType()`

    - #### getRow

          public XWPFTableRow getRow(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRow row)

      returns the XWPFRow which belongs to the CTRow row if this row is not existing in the table null will be returned

    - #### getWidthDecimal

          public double getWidthDecimal()

      Get the table width as a decimal value.

      If the width type is DXA or AUTO, then the value will always have a fractional part of zero (because these values are really integers). If the with type is percentage, then value may have a non-zero fractional part.

      Returns:
        Width value as a double-precision decimal.
      Since:
        4.0.0

    - #### getWidthDecimal

          protected static double getWidthDecimal(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth ctWidth)

      Get the width as a decimal value.

      This method is also used by table cells.

      Parameters:
        `ctWidth` - Width value to evaluate.
      Returns:
        Width value as a decimal
      Since:
        4.0.0

    - #### getWidthType

          public TableWidthType getWidthType()

      Get the width type for the table, as an `STTblWidth.Enum` value. A table width can be specified as an absolute measurement (an integer number of twips), a percentage, or the value "AUTO".
      Returns:
        The width type.
      Since:
        4.0.0

    - #### getWidthType

          protected static TableWidthType getWidthType(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth ctWidth)

      Get the width type from the width value
      Parameters:
        `ctWidth` - CTTblWidth to evalute
      Returns:
        The table width type
      Since:
        4.0.0

    - #### setWidth

          public void setWidth(java.lang.String widthValue)

      Set the width to the value "auto", an integer value (20ths of a point), or a percentage ("nn.nn%").
      Parameters:
        `widthValue` - String matching one of "auto", [0-9]+, or [0-9]+(\.[0-9]+)%.
      Since:
        4.0.0

    - #### setWidthValue

          protected static void setWidthValue(java.lang.String widthValue,
                                              org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth ctWidth)

      Set the width value from a string
      Parameters:
        `widthValue` - The width value string
        `ctWidth` - CTTblWidth to set the value on.

    - #### setWidthPercentage

          protected static void setWidthPercentage(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth ctWidth,
                                                   java.lang.String widthValue)

      Set the underlying table width value to a percentage value.
      Parameters:
        `ctWidth` - The CTTblWidth to set the value on
        `widthValue` - String width value in form "33.3%" or an integer that is 50 times desired percentage value (e.g, 2500 for 50%)
      Since:
        4.0.0

    - #### setWidthType

          public void setWidthType(TableWidthType widthType)

      Set the width value type for the table.

      If the width type is changed from the current type and the currently-set value is not consistent with the new width type, the value is reset to the default value for the specified width type.

      Parameters:
        `widthType` - Width type
      Since:
        4.0.0

    - #### setWidthType

          protected static void setWidthType(TableWidthType widthType,
                                             org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth ctWidth)

      Set the width type if different from current width type
      Parameters:
        `widthType` - The new width type
        `ctWidth` - CTTblWidth to set the type on
      Since:
        4.0.0

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.