[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IIconSetCondition.FromJson

FromJson Method

FromJson(string)

Loads an icon set conditional formatting rule from a JSON string into this object.

Updates this icon set conditional formatting rule by deserializing the specified JSON content. The JSON string should represent an icon set conditional format, such as one generated by ToJson().

Declaration
void FromJson(string json)
Sub FromJson(json As String)
Parameters
Type Name Description
string json

The JSON string that defines the icon set conditional format.

Examples
worksheet.Range["A1:A5"].Value = new object[,] {{10}, {30}, {50}, {70}, {90}};
IIconSetCondition source = worksheet.Range["A1:A5"].FormatConditions.AddIconSetCondition();
source.IconSet = workbook.IconSets[IconSetType.Icon3TrafficLights1];
string json = source.ToJson();
IIconSetCondition target = worksheet.Range["B1:B5"].FormatConditions.AddIconSetCondition();
target.FromJson(json);
Exceptions
Type Condition
InvalidOperationException

if the JSON string does not represent an icon set conditional format.