Get Started
Usage API
More information

GetAllTablesOnPage

GetAllTablesOnPage() → { Array.<ApiTable> }

Get the collection of tables on a given absolute page. This method can be a little bit slow, because it runs the document calculation process to arrange tables on the specified page.

Parameters:

This method doesn't have any parameters.

Returns:

Type
Array.<ApiTable>

Example

Copy code
builder.CreateFile("docx");
oDocument = Api.GetDocument();
oTableStyle = oDocument.GetStyle("Bordered - Accent 5")
oTable = Api.CreateTable(3, 3);
oTable.SetWidth("percent", 50);
oTable.SetStyle(oTableStyle);
oDocument.Push(oTable);
arrTables = oDocument.GetAllTablesOnPage(0);
oRow_1 = arrTables[0].GetRow(0);
oRow_1.Remove();
builder.SaveFile("docx", "GetAllTablesOnPage.docx");
builder.CloseFile();

Resulting document