[]
Generates a JSON string from the conditional format.
The returned string contains the serialized state of this IAboveAverage rule and can be used with FromJson(string) to restore the conditional format.
string ToJson()
Function ToJson() As String
| Type | Description |
|---|---|
| string | The conditional format JSON string. |
worksheet.Range["A1:A5"].Value = new object[,] {{10}, {20}, {30}, {40}, {50}};
IAboveAverage format = worksheet.Range["A1:A5"].FormatConditions.AddAboveAverage();
format.Interior.Color = Color.Yellow;
format.AboveBelow = AboveBelow.AboveAverage;
string json = format.ToJson();