[]
Obtains the JSON string of the current Sparkline.
If a cell contains a sparkline formula, calling Value returns an ISparkLineObject that can be serialized to JSON by using this method.
string ToJson()
Function ToJson() As String
| Type | Description |
|---|---|
| string | The JSON string corresponding to the current Sparkline. |
worksheet.Range["B1:E1"].Value = new object[] {1, 3, 2, 4};
worksheet.Range["F1"].Formula = "=LINESPARKLINE(B1:E1,1)";
ISparkLineObject sparkline = (ISparkLineObject)worksheet.Range["F1"].Value;
string json = sparkline.ToJson();