GetAllTablesOnPage

function GetAllTablesOnPage(nPage: number = null): ApiTable[]

Description

Returns a 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

nPagenumberdefault: null

The page number.

Returns

ApiTable[]

Try It

var oDocument = Api.GetDocument();
var oTableStyle = oDocument.GetStyle("Bordered");
var oTable = Api.CreateTable(3, 3);
oTable.SetWidth("percent", 50);
oTable.SetStyle(oTableStyle);
oDocument.Push(oTable);
var arrTables = oDocument.GetAllTablesOnPage(0);
var oRow_1 = arrTables[0].GetRow(0);
oRow_1.Remove();

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).