ApiTable

class ApiTable

Description

Class representing a table.

Instance Methods

AddElement(oCell, nPos, oElement)

Adds a paragraph or a table or a blockLvl content control using its position in the cell.

Copy(): ApiTable

Creates a copy of the current table.

GetClassType(): table

Returns the type of the ApiTable object.

GetRow(nIndex): ApiTableRow

Returns a row by its index.

MergeCells(aCells): ApiTableCell

Merges an array of cells.

SetTableLook(isFirstColumn, isFirstRow, isLastColumn, isLastRow, isHorBand, isVerBand)

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.

AddRow(oCell, isBefore): ApiTableRow

Adds a new row to the current table.

AddColumn(oCell, isBefore)

Adds a new column to the end of the current table.

RemoveRow(oCell): boolean

Removes a table row with the specified cell.

RemoveColumn(oCell): boolean

Removes a table column with the specified cell.

SetShd(sType, r, g, b)

Specifies the shading which shall be applied to the extents of the current table.

ToJSON(bWriteTableStyles): JSON

Converts the ApiTable object into the JSON object.

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).