[]
Generates a JSON string from the conditional format.
Use this method to serialize the current top or bottom N conditional formatting rule so that it can be stored or later restored with FromJson(string).
string ToJson()
Function ToJson() As String
| Type | Description |
|---|---|
| string | The conditional format JSON string. |
worksheet.Range["A1:A5"].Value = new object[,] {
{10}, {30}, {50}, {70}, {90}
};
ITop10 condition = worksheet.Range["A1:A5"].FormatConditions.AddTop10();
condition.Interior.Color = Color.Yellow;
condition.Rank = 3;
string json = condition.ToJson();