Get Started
Usage API
More information

GetType

GetType() → { TableStyleOverrideType }

Returns a type of the current table conditional style.

Parameters:

This method doesn't have any parameters.

Returns:

Type
TableStyleOverrideType

Example

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

Resulting document