[]
Generates a JSON string from the conditional format.
The returned string represents the current conditional formatting rule and can be used with FromJson(string) to recreate the rule.
string ToJson()
Function ToJson() As String
| Type | Description |
|---|---|
| string | The conditional format JSON string. |
IRange range = worksheet.Range["A1:A5"];
range.Value = new object[,] {{10}, {30}, {50}, {70}, {90}};
IFormatCondition condition = (IFormatCondition) range.FormatConditions.Add(
FormatConditionType.CellValue, FormatConditionOperator.Greater, 60, null);
condition.Interior.Color = Color.Yellow;
string json = condition.ToJson();