Get Started
Documentation

GetType

GetType() → {TableStyleOverrideType}

Get the type of the current table conditional style.

Returns:

Type
TableStyleOverrideType

Example

Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oTable, oTableStyle, oTableStylePr;
oTableStyle = oDocument.GetStyle("Bordered - Accent 5");
oTableStyle.SetName("My Custom Style");
oTable = Api.CreateTable(2, 2);
oTable.SetWidth("percent", 100);
oTableStylePr = oTableStyle.GetConditionalTableStyle("topLeftCell");
oTable.SetStyle(oTableStyle);
oDocument.Push(oTable);
var oTableStylePrType = oTableStylePr.GetType();
oParagraph = oDocument.GetElement(0);
oParagraph.AddText("Style type = " + oTableStylePrType);
builder.SaveFile("docx", "GetType.docx");
builder.CloseFile();

Resulting document

The resulting sample document will be available here with the nearest ONLYOFFICE Document Builder API documentation website update.