Skip to main content

ApiTableCell

Class representing a table cell.

ApiTableCell is a subclass of ApiTableCellPr.

Methods​

The following table lists the available methods.

MethodReturnsDescription
AddColumnsApiTable | nullAdds the new columns to the current table.
AddElementbooleanAdds a paragraph or a table or a blockLvl content control using its position in the cell.
AddRowsApiTable | nullAdds the new rows to the current table.
AddTextApiRunAppends text to the end of the cell content.
ClearbooleanClears the content from the current cell.
GetBackgroundColorApiColorReturns the background color of the current table cell.
GetClassType"tableCell"Returns a type of the ApiTableCell class.
GetContentApiDocumentContentReturns the current cell content.
GetIndexNumberReturns the current cell index.
GetInternalIdstringReturns an internal id of the current table cell.
GetNextApiTableCell | nullReturns the next cell if exists.
GetParentRowApiTableRow | nullReturns a parent row of the current cell.
GetParentTableApiTable | nullReturns a parent table of the current cell.
GetPreviousApiTableCell | nullReturns the previous cell if exists.
GetRowIndexnumberReturns an index of the parent row.
GetTextstringReturns the inner text of the current table cell.
RemoveColumnbooleanRemoves a column containing the current cell.
RemoveRowbooleanRemoves a row containing the current cell.
SearchApiRange[]Searches for a scope of a table cell object.
SetBackgroundColorbooleanSets the background color to the current table cell.
SetCellBorderBottombooleanSets the border which will be displayed at the bottom of the current table cell.
SetCellBorderLeftbooleanSets the border which will be displayed to the left of the current table cell.
SetCellBorderRightbooleanSets the border which will be displayed to the right of the current table cell.
SetCellBorderTopbooleanSets the border which will be displayed at the top of the current table cell.
SetCellMarginBottombooleanSpecifies an amount of space which will be left between the bottom extent of the cell contents and the border of a specific table cell within a table.
SetCellMarginLeftbooleanSpecifies an amount of space which will be left between the left extent of the cell contents and the border of a specific table cell within a table.
SetCellMarginRightbooleanSpecifies an amount of space which will be left between the right extent of the cell contents and the border of a specific table cell within a table.
SetCellMarginTopbooleanSpecifies an amount of space which will be left between the upper extent of the cell contents and the border of a specific table cell within a table.
SetCellPrbooleanSets the cell properties to the current cell.
SetColumnBackgroundColorbooleanSets the background color to all cells in the column containing the current cell.
SetNoWrapbooleanSpecifies how the current table cell is laid out when the parent table is displayed in a document.
SetShdbooleanSpecifies the shading applied to the contents of the table cell.
SetTextApiRunReplaces all content of the current table cell with the specified text, preserving the formatting of the first paragraph.
SetTextDirectionbooleanSpecifies the direction of the text flow for this table cell.
SetTextPrbooleanApplies the text settings to the entire contents of the current cell.
SetVerticalAlignbooleanSpecifies the vertical alignment for the text contents within the current table cell.
SetWidthbooleanSets the preferred width to the current table cell.
SplitApiTable | nullSplits the cell into a given number of rows and columns.
ToJSONJSONConverts the ApiTableCellPr object into the JSON object.