Get Started
Documentation

GetTablePr

GetTablePr() → {ApiTablePr}

Get the set of the table properties which will be applied to all the regions within a table which match the conditional formatting type.

Returns:

Type
ApiTablePr

Example

Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oParagraph, oTable, oTableStyle, oTableStylePr, oParaPr;
oParagraph = oDocument.GetElement(0);
oParagraph.AddText("We create a 3x3 table and set the bottom 4 point green border to it:");
oTableStyle = oDocument.CreateStyle("CustomTableStyle", "table");
oTableStyle.SetBasedOn(oDocument.GetStyle("Bordered - Accent 5"));
oTable = Api.CreateTable(3, 3);
oTable.SetWidth("percent", 100);
oTableStylePr = oTableStyle.GetConditionalTableStyle("wholeTable");
oTable.SetTableLook(true, true, true, true, true, true);
oTableStylePr.GetTablePr().SetTableBorderBottom("single", 32, 0, 0, 255, 0);
oTable.SetStyle(oTableStyle);
oDocument.Push(oTable);
builder.SaveFile("docx", "GetTablePr.docx");
builder.CloseFile();

Resulting document