SetHeight

function SetHeight(sHRule: any = null, nValue: any = null): void

Description

Sets the height to the current table row within the current table.

Parameters

sHRuleanydefault: null

The rule to apply the height value to the current table row or ignore it. Use the "atLeast" value to enable the SetHeight method use.

nValueanydefault: null

The height for the current table row measured in twentieths of a point (1/1440 of an inch). This value will be ignored if sHRule="auto".

Returns

void

Try It

var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText("We create a 3x3 table and set the height of half an inch to all the rows:");
var oTableStyle = oDocument.CreateStyle("CustomTableStyle", "table");
oTableStyle.SetBasedOn(oDocument.GetStyle("Bordered"));
var oTable = Api.CreateTable(3, 3);
oTable.SetWidth("percent", 100);
oTable.SetTableLook(true, true, true, true, false, false);
var oTableRowPr = oTableStyle.GetTableRowPr();
oTableRowPr.SetHeight("atLeast", 720);
oTable.SetStyle(oTableStyle);
oDocument.Push(oTable);

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