TabFormatCondition GetTabFormatCondition(string mon)
mon. Moniker of the range for working with its conditional formats.
The GetTabFormatCondition operation gets conditional format settings for cell range.
To execute the operation, in the mon field specify regular report instance moniker with the !Sheets!sheet key!range address!FormatConditions!conditional format index postfix.
The operation results in the conditional format settings.
Below is the example of getting conditional format settings. The request contains conditional format moniker, the response contains the obtained settings.
{
"GetTabFormatCondition" :
{
"mon" : "S1!M!S!P1!Sheets!1!A0:B3!FormatConditions!0"
}
}
{
"GetTabFormatConditionResult" :
{
"k" : "0",
"Key" : "0",
"Type" : "CellContent",
"Range" :
{
"left" : "0",
"top" : "0",
"width" : "2",
"height" : "4"
},
"Enabled" : "1",
"Details" :
{
"CellContent" :
{
"ContentType" : "0",
"CellValue" : "100",
"SpecificText" : "",
"Style" :
{
"@UNS" : "2",
"Text" :
{
"@VA" : "-1",
"@Mmm" : "-1.00 -1.00 -1.00 -1.00",
"@HA" : "-1",
"@M" : "-1 -1 -1 -1",
"@WW" : "-1"
},
"Font" :
{
"@B" : "true",
"@S" : "10",
"@H" : "15"
},
"Borders" : "",
"Hyperlink" : ""
},
"ValueCondition" : "4",
"TextCondition" : "0",
"DateCondition" : "0",
"MinValue" : "",
"MaxValue" : ""
}
}
}
}
public static TabFormatCondition GetFormatCondition(string moniker, string sheetKey, string address, string formatKey)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tTab = new GetTabFormatCondition()
{
mon = moniker + "!Sheets!" + sheetKey + '!' + address+ "!FormatConditions!" + formatKey
};
// Get conditional format parameters
var result = somClient.GetTabFormatCondition(tTab);
return result;
}
See also: