Get Started
Usage API
More information

ApiTableRow

new ApiTableRow()

Class representing a table row.

Methods

Name Description
AddRows

Add the new rows to the current table.

Clear

Clear the content from row.

GetCell

Get the cell by its position.

GetCellsCount

Get the number of cells in the current row.

GetClassType

Get the type of this class.

GetIndex

Get the row index.

GetNext

Get the next row.

GetParentTable

Get parent table of the row.

GetPrevious

Get the previous row.

MergeCells

Merge cells in the row.

Remove

Remove a table row.

Search

Search for the scope of a table row object. The search results are a collection of ApiRange objects.

SetHeight

Set the height of the current table row within the current table.

SetTableHeader

Specify that the current table row will be repeated at the top of each new page wherever this table is displayed. This gives this table row the behavior of a 'header' row on each of these pages. This element can be applied to any number of rows at the top of the table structure in order to generate multi-row table headers.

SetTextPr

Set text properties for the row.

Example

Copy code
builder.CreateFile("docx");
oDocument = Api.GetDocument();
oParagraph = oDocument.GetElement(0);
oParagraph.AddText("We create a 3x3 table and set the height of half an inch to row #1:");
oTableStyle = oDocument.CreateStyle("CustomTableStyle", "table");
oTableStyle.SetBasedOn(oDocument.GetStyle("Bordered - Accent 5"));
oTable = Api.CreateTable(3, 3);
oTable.SetWidth("percent", 100);
oTableRow = oTable.GetRow(0);
oTableRow.SetHeight("atLeast", 720);
oTable.SetStyle(oTableStyle);
oDocument.Push(oTable);
builder.SaveFile("docx", "SetHeight.docx");
builder.CloseFile();

Resulting document