ApiTable
Class representing a table.
ApiTable is a subclass of ApiDrawing.
Properties
| Name | Type | Description |
|---|---|---|
| Cells | ApiTableCell[][] | Returns all cells of the current table as a two-dimensional array indexed by [row][cell]. |
| Rows | ApiTableRow[] | Returns all rows of the current table. |
Methods
The following table lists the available methods.
| Method | Returns | Description |
|---|---|---|
| AddColumn | None | Adds a new column to the end of the current table. |
| AddColumns | ApiTable | null | Adds the new columns to the current table. |
| AddElement | boolean | Adds a paragraph using its position in the cell. |
| AddRow | ApiTableRow | Adds a new row to the current table. |
| AddRows | ApiTable | null | 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 specified drawing object from the parent. |
| Fill | boolean | Sets the fill formatting properties to the current graphic object. |
| GetCell | ApiTableCell | null | Returns a cell by its position. |
| GetClassType | "table" | Returns the type of the ApiTable object. |
| GetColumnWidth | EMU | null | Returns the width of the specified column (by index) of the current table. |
| GetColumnsCount | number | Returns a number of columns in the current table. |
| GetDescription | string | null | Gets the description of the current drawing. |
| GetFill | ApiFill | null | Gets the fill formatting properties from the current graphic object. |
| GetFlipH | boolean | null | Get horizontal flip of current drawing. |
| GetFlipV | boolean | null | Get vertical flip of current drawing. |
| GetHeight | EMU | Returns the height of the current drawing. |
| GetHyperlink | ApiHyperlink | null | Returns the hyperlink from the current drawing object (shape or image). |
| GetInternalId | string | Returns an internal ID of the current table. |
| GetLine | ApiStroke | null | Gets the outline properties from the current graphic object. |
| GetLockAspect | boolean | Returns whether the aspect ratio of the drawing is locked. |
| GetLockValue | boolean | Returns the lock value for the specified lock type of the current drawing. |
| GetName | string | Returns the name of the current drawing. |
| GetParent | ApiSlide | ApiLayout | ApiMaster | null | Returns the drawing parent object. |
| GetParentLayout | ApiLayout | null | Returns the drawing parent slide layout. |
| GetParentMaster | ApiMaster | null | Returns the drawing parent slide master. |
| GetParentSlide | ApiSlide | null | Returns the drawing parent slide. |
| GetPlaceholder | ApiPlaceholder | null | Returns a placeholder from the current drawing object. |
| GetPosX | EMU | Gets the x position of the drawing on the slide. |
| GetPosY | EMU | Gets the y position of the drawing on the slide. |
| GetRotation | number | Returns the rotation angle of the current drawing object. |
| GetRow | ApiTableRow | null | undefined | Returns a row by its index. |
| GetRowsCount | number | Returns a number of rows in the current table. |
| GetSelectedCells | ApiTableCell[] | Returns the selected cells of the current table. |
| GetSelectedColumnsCells | ApiTableCell[] | Returns all cells from the columns that contain the currently selected cells. This method identifies which columns contain selected cells and then returns all cells in those columns, not just the selected cells themselves. |
| GetSelectedRows | ApiTableRow[] | Returns the rows that contain the currently selected cells of the current table. |
| GetShadow | ApiShadow | null | Returns the shadow of the current graphic object. |
| GetTableDescription | string | Returns the table description. |
| GetTableLook | TableLook | Gets table look properties |
| GetTableTitle | string | Returns the table title. |
| GetTextRange | ApiTextRange | null | Returns an ApiTextRange covering the full text content of the shape. Creates a text body if the shape does not yet have one. |
| GetTitle | string | null | Gets the title of the current drawing. |
| GetVisitor | ApiPresentationVisitor | Returns a visitor object for traversing the text of the current drawing, including the drawings nested in a group. |
| GetWidth | EMU | Returns the width of the current drawing. |
| HasTextContent | boolean | Checks whether the drawing has an associated text body. |
| MergeCells | ApiTableCell | null | undefined | Merges an array of cells. |
| RemoveColumn | boolean | Removes a table column with the specified cell. |
| RemoveRow | boolean | Removes a table row with the specified cell. When the last row is removed, the whole table is deleted from the slide |
| ReplacePlaceholder | boolean | Replaces the placeholder by a drawing on the slide. |
| Select | boolean | Selects the current graphic object. |
| SelectRange | boolean | Selects a range of cells in the current table. |
| SetBackgroundColor | boolean | Sets the background color for all cells in the current table. |
| SetColumnWidth | EMU | null | Sets the width of the specified column in the current table. |
| SetDescription | boolean | Sets the description of the current drawing. |
| SetFill | boolean | Sets the fill formatting properties to the current graphic object. |
| SetFlipH | boolean | Sets the horizontal flip of the current drawing. |
| SetFlipV | boolean | Sets the vertical flip of the current drawing. |
| SetHeight | boolean | Sets the total height of the current table, distributing it evenly among the table rows. The value is applied as a minimum height for each row, so a row can be taller if its content requires more space. |
| SetHyperlink | boolean | Sets a hyperlink to the current drawing object (shape or image). |
| SetLine | boolean | Sets the outline properties to the current graphic object. |
| SetLockAspect | boolean | Sets whether the aspect ratio of the drawing is locked. |
| SetLockValue | boolean | Sets the lock value to the specified lock type of the current drawing. |
| SetName | boolean | Sets the name of the current drawing. |
| SetOutLine | boolean | Sets the outline properties to the specified graphic object. |
| SetPlaceholder | boolean | Sets the specified placeholder to the current drawing object. |
| SetPosX | boolean | Sets the x position of the drawing on the slide. |
| SetPosY | boolean | Sets the y position of the drawing on the slide. |
| SetPosition | None | Sets the position of the drawing on the slide. |
| SetRotation | boolean | Sets the rotation angle to the current drawing object. |
| SetShadow | boolean | Sets the shadow to the current graphic object. |
| SetShd | None | Specifies the shading which shall be applied to the extents of the current table. |
| SetSize | boolean | Sets the table size. |
| SetStyle | boolean | Sets the style for the current table. |
| SetTableDescription | boolean | Sets the table description. |
| SetTableLook | None | Specifies the components of the conditional formatting of the referenced table style (if one exists) which shall be applied to the set of table rows with the current table-level property exceptions. A table style can specify up to six different optional conditional formats [Example: Different formatting for first column], which then can be applied or omitted from individual table rows in the parent table. |
| SetTableTitle | boolean | Sets the table title. |
| SetTitle | boolean | Sets the title of the current drawing. |
| ToJSON | JSON | Converts the ApiTable object into the JSON object. |
| Unselect | boolean | Removes the current graphic object from the selection. |