[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IDataBar.ToJson

ToJson Method

ToJson()

Generates a JSON string from the data bar rule.

Use this method to serialize the current data bar settings so that they can be reused with FromJson(string) or stored for later use.

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

A JSON string that represents the current data bar rule.

Examples
worksheet.Range["A1:A3"].Value = new object[,] {
    {10},
    {30},
    {20}
};
IDataBar dataBar = worksheet.Range["A1:A3"].FormatConditions.AddDatabar();
string json = dataBar.ToJson();