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
AddColumnbooleanAdds a new column to the end of the current table.
AddColumnsApiTableAdds the new columns to the current table.
AddElementbooleanAdds a paragraph using its position in the cell.
AddRowApiTableRowAdds a new row to the current table.
AddRowsApiTableAdds the new rows to the current 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 | null | undefinedReturns 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.
GetInternalIdstringReturns an internal ID of the current drawing.
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.
GetParentPageApiPage | null | undefinedReturns the type of the ApiDrawing class.
GetPosXEMUGets the x position of the drawing on the page.
GetPosYEMUGets the y position of the drawing on the page.
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 a text range that covers the whole text of the current drawing. Creates a text body if the drawing does not yet have one.
GetTitlestring | nullGets the title of the current drawing.
GetWidthEMUReturns the width of the current drawing.
HasTextContentbooleanChecks whether the current drawing has a 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.
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.
SetHeightEMU | nullSets 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.
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. If another drawing with the same name already exists, that drawing's name will be reset to a default auto-generated name. OLE objects do not support a custom name, so for them this method always returns false.
SetOutLinebooleanSets the outline properties to the current graphic object.
SetPosXbooleanSets the x position of the drawing on the page.
SetPosYbooleanSets the y position of the drawing on the page.
SetPositionbooleanSets the position of the drawing on the page.
SetRotationbooleanSets the rotation angle to the current drawing object.
SetShadowbooleanSets the shadow to the current graphic object.
SetShdbooleanSpecifies 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.
SetTableLookbooleanSpecifies 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.
UnselectbooleanRemoves the current graphic object from the selection.