Skip to main content

ApiTable

Class representing a table.

ApiTable is a subclass of ApiDrawing.

Properties​

NameTypeDescription
CellsApiTableCell[][]Returns all cells of the current table as a two-dimensional array indexed by [row][cell].
RowsApiTableRow[]Returns all rows of the current table.

Methods​

The following table lists the available methods.

MethodReturnsDescription
AddColumnNoneAdds a new column to the end of the current table.
AddColumnsApiTable | nullAdds the new columns to the current table.
AddElementbooleanAdds a paragraph using its position in the cell.
AddRowApiTableRowAdds a new row to the current table.
AddRowsApiTable | nullAdds the new rows to the current table.
ClearbooleanClears the content from the table.
CopyApiTableCreates a copy of the current table.
DeletebooleanDeletes the specified drawing object from the parent.
FillbooleanSets the fill formatting properties to the current graphic object.
GetCellApiTableCell | nullReturns a cell by its position.
GetClassType"table"Returns the type of the ApiTable object.
GetColumnWidthEMU | nullReturns the width of the specified column (by index) of the current table.
GetColumnsCountnumberReturns a number of columns in the current table.
GetDescriptionstring | nullGets the description of the current drawing.
GetFillApiFill | nullGets the fill formatting properties from the current graphic object.
GetFlipHboolean | nullGet horizontal flip of current drawing.
GetFlipVboolean | nullGet vertical flip of current drawing.
GetHeightEMUReturns the height of the current drawing.
GetHyperlinkApiHyperlink | nullReturns the hyperlink from the current drawing object (shape or image).
GetInternalIdstringReturns an internal ID of the current table.
GetLineApiStroke | nullGets the outline properties from the current graphic object.
GetLockAspectbooleanReturns whether the aspect ratio of the drawing is locked.
GetLockValuebooleanReturns the lock value for the specified lock type of the current drawing.
GetNamestringReturns the name of the current drawing.
GetParentApiSlide | ApiLayout | ApiMaster | nullReturns the drawing parent object.
GetParentLayoutApiLayout | nullReturns the drawing parent slide layout.
GetParentMasterApiMaster | nullReturns the drawing parent slide master.
GetParentSlideApiSlide | nullReturns the drawing parent slide.
GetPlaceholderApiPlaceholder | nullReturns a placeholder from the current drawing object.
GetPosXEMUGets the x position of the drawing on the slide.
GetPosYEMUGets the y position of the drawing on the slide.
GetRotationnumberReturns the rotation angle of the current drawing object.
GetRowApiTableRow | null | undefinedReturns a row by its index.
GetRowsCountnumberReturns a number of rows in the current table.
GetSelectedCellsApiTableCell[]Returns the selected cells of the current table.
GetSelectedColumnsCellsApiTableCell[]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.
GetSelectedRowsApiTableRow[]Returns the rows that contain the currently selected cells of the current table.
GetShadowApiShadow | nullReturns the shadow of the current graphic object.
GetTableDescriptionstringReturns the table description.
GetTableLookTableLookGets table look properties
GetTableTitlestringReturns the table title.
GetTextRangeApiTextRange | nullReturns an ApiTextRange covering the full text content of the shape. Creates a text body if the shape does not yet have one.
GetTitlestring | nullGets the title of the current drawing.
GetVisitorApiPresentationVisitorReturns a visitor object for traversing the text of the current drawing, including the drawings nested in a group.
GetWidthEMUReturns the width of the current drawing.
HasTextContentbooleanChecks whether the drawing has an associated text body.
MergeCellsApiTableCell | null | undefinedMerges an array of cells.
RemoveColumnbooleanRemoves a table column with the specified cell.
RemoveRowbooleanRemoves a table row with the specified cell. When the last row is removed, the whole table is deleted from the slide
ReplacePlaceholderbooleanReplaces the placeholder by a drawing on the slide.
SelectbooleanSelects the current graphic object.
SelectRangebooleanSelects a range of cells in the current table.
SetBackgroundColorbooleanSets the background color for all cells in the current table.
SetColumnWidthEMU | nullSets the width of the specified column in the current table.
SetDescriptionbooleanSets the description of the current drawing.
SetFillbooleanSets the fill formatting properties to the current graphic object.
SetFlipHbooleanSets the horizontal flip of the current drawing.
SetFlipVbooleanSets the vertical flip of the current drawing.
SetHeightbooleanSets 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.
SetHyperlinkbooleanSets a hyperlink to the current drawing object (shape or image).
SetLinebooleanSets the outline properties to the current graphic object.
SetLockAspectbooleanSets whether the aspect ratio of the drawing is locked.
SetLockValuebooleanSets the lock value to the specified lock type of the current drawing.
SetNamebooleanSets the name of the current drawing.
SetOutLinebooleanSets the outline properties to the specified graphic object.
SetPlaceholderbooleanSets the specified placeholder to the current drawing object.
SetPosXbooleanSets the x position of the drawing on the slide.
SetPosYbooleanSets the y position of the drawing on the slide.
SetPositionNoneSets the position of the drawing on the slide.
SetRotationbooleanSets the rotation angle to the current drawing object.
SetShadowbooleanSets the shadow to the current graphic object.
SetShdNoneSpecifies the shading which shall be applied to the extents of the current table.
SetSizebooleanSets the table size.
SetStylebooleanSets the style for the current table.
SetTableDescriptionbooleanSets the table description.
SetTableLookNoneSpecifies 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.
SetTableTitlebooleanSets the table title.
SetTitlebooleanSets the title of the current drawing.
ToJSONJSONConverts the ApiTable object into the JSON object.
UnselectbooleanRemoves the current graphic object from the selection.