[]
Generates a JSON string from the conditional formats.
Use this method to serialize all conditional formatting rules associated with the range so that they can be stored or later restored with FromJson(string).
string ToJson()
Function ToJson() As String
| Type | Description |
|---|---|
| string | The conditional formats JSON string. |
worksheet.Range["A1:A5"].Value = new object[,] {
{10}, {30}, {50}, {70}, {90}
};
IFormatConditions conditions = worksheet.Range["A1:A5"].FormatConditions;
conditions.AddTop10().Rank = 3;
string json = conditions.ToJson();