ApiTable
ApiTable is a subclass of ApiTablePr.
Methods
| Method | Returns | Description |
|---|---|---|
| AddCaption | boolean | Adds a caption paragraph after (or before) the current table. |
| AddColumn | boolean | Adds a new column to the current table. |
| AddColumns | ApiTable | Adds the new columns to the current table. |
| AddComment | ApiComment | Adds a comment to all contents of the current table. |
| AddElement | boolean | Adds a paragraph or a table or a blockLvl content control using its position in the cell. |
| AddRow | ApiTableRow | Adds a new row to the current table. |
| AddRows | ApiTable | Adds the new rows to the current table. |
| Clear | boolean | Clears the content from the table. |
| Copy | ApiTable | Creates a copy of the current table. |
| Delete | boolean | Deletes the current table. |
| GetAllCells | ApiTableCell[] | Returns a collection of all cells in the table. |
| GetCell | ApiTableCell | Returns a cell by its position. |
| GetClassType | "table" | Returns a type of the ApiTable class. |
| GetInternalId | string | Returns an internal ID of the current table. |
| GetParentContentControl | ApiBlockLvlSdt | null | Returns a content control that contains the current table. |
| GetParentTable | ApiTable | null | Returns a table that contains the current table. |
| GetParentTableCell | ApiTableCell | null | Returns a table cell that contains the current table. |
| GetPosInParent | Number | Returns the table position within its parent element. |
| GetRange | ApiRange | Returns a Range object that represents the part of the document contained in the specified table. |
| GetRow | ApiTableRow | Returns a table row by its position in the table. |
| GetRowsCount | number | Returns a number of rows in the current table. |
| GetTableDescription | string | Returns the table description. |
| GetTableTitle | string | Returns the table title (caption). |
| GetTables | ApiTable[] | Returns an array of tables that represents all the tables nested within the specified table. |
| InsertInContentControl | ApiTable | ApiBlockLvlSdt | Wraps the current table object with a content control. |
| MergeCells | ApiTableCell | Merges an array of cells. If the merge is done successfully, it will return the resulting merged cell, otherwise the result will be "null". |
| RemoveColumn | boolean | Removes a table column with a specified cell. |
| RemoveRow | boolean | Removes a table row with a specified cell. |
| ReplaceByElement | boolean | Replaces the current table with a new element. |
| Search | ApiRange[] | Searches for a scope of a table object. The search results are a collection of ApiRange objects. |
| Select | boolean | Selects the current table. |
| SetBackgroundColor | boolean | Sets the background color to all cells in the current table. |
| SetCellSpacing | boolean | Specifies the default table cell spacing (the spacing between adjacent cells and the edges of the table). |
| SetHAlign | boolean | Sets the horizontal alignment to the table. |
| SetJc | boolean | Specifies the alignment of the current table with respect to the text margins in the current section. |
| SetPaddings | boolean | Sets the table paddings. |
| SetShd | boolean | Specifies the shading which is applied to the extents of the current table. |
| SetStyle | boolean | Sets a style to the current table. |
| SetStyleColBandSize | boolean | Specifies a number of columns which will comprise each table column band for this table style. |
| SetStyleRowBandSize | boolean | Specifies a number of rows which will comprise each table row band for this table style. |
| SetTableBorderAll | boolean | Specifies a border which will be displayed on all table cell borders. |
| SetTableBorderBottom | boolean | Sets the border which will be displayed at the bottom of the current table. |
| SetTableBorderInsideH | boolean | Specifies the border which will be displayed on all horizontal table cell borders which are not on the outmost edge |
| SetTableBorderInsideV | boolean | Specifies the border which will be displayed on all vertical table cell borders which are not on the outmost edge |
| SetTableBorderLeft | boolean | Sets the border which will be displayed on the left of the current table. |
| SetTableBorderRight | boolean | Sets the border which will be displayed on the right of the current table. |
| SetTableBorderTop | boolean | Sets the border which will be displayed at the top of the current table. |
| SetTableCellMarginBottom | boolean | Specifies an amount of space which will be left between the bottom extent of the cell contents and the border |
| SetTableCellMarginLeft | boolean | Specifies an amount of space which will be left between the left extent of the cell contents and the left |
| SetTableCellMarginRight | boolean | Specifies an amount of space which will be left between the right extent of the cell contents and the right |
| SetTableCellMarginTop | boolean | Specifies an amount of space which will be left between the top extent of the cell contents and the top border |
| SetTableDescription | boolean | Sets the table description. |
| SetTableInd | boolean | Specifies the indentation which will be added before the leading edge of the current table in the document |
| SetTableLayout | boolean | Specifies the algorithm which will be used to lay out the contents of the current table within the document. |
| SetTableLook | boolean | Specifies the conditional formatting components of the referenced table style (if one exists) |
| SetTableTitle | boolean | Sets the table title (caption). |
| SetTextPr | boolean | Applies the text settings to the entire contents of the table. |
| SetVAlign | boolean | Sets the vertical alignment to the table. |
| SetWidth | boolean | Sets the preferred width to the current table. |
| SetWrappingStyle | boolean | Sets the table wrapping style. |
| Split | ApiTable | null | Splits the cell into a given number of rows and columns. |
| ToJSON | JSON | Converts the ApiTable object into the JSON object. |