[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IColorScale.ToJson

ToJson Method

ToJson()

Generates a JSON string from the conditional format.

The returned string represents the current color scale conditional formatting rule and can be used with FromJson(string) to recreate the rule.

Declaration
string ToJson()
Function ToJson() As String
Returns
Type Description
string

The conditional format JSON string.

Examples
IRange range = worksheet.Range["A1:A5"];
range.Value = new object[,] {{10}, {30}, {50}, {70}, {90}};
IColorScale colorScale = range.FormatConditions.AddColorScale(ColorScaleType.TwoColorScale);
string json = colorScale.ToJson();