[]
This interface provides access to a sparkline value stored in a worksheet cell. Use toJson() to obtain the JSON representation of the current sparkline.
worksheet.getRange("A1").setFormula("=LINESPARKLINE({1,2,8,4,5,6},1)");
ISparkLineObject sparkLineObject = (ISparkLineObject) worksheet.getRange("A1").getValue();
String json = sparkLineObject.toJson();
If a cell contains a sparkline formula, calling IRange.getValue() returns an ISparkLineObject that can be serialized to JSON by using this method.
worksheet.getRange("B1:E1").setValue(new Object[] {1, 3, 2, 4});
worksheet.getRange("F1").setFormula("=LINESPARKLINE(B1:E1,1)");
ISparkLineObject sparkline = (ISparkLineObject) worksheet.getRange("F1").getValue();
String json = sparkline.toJson();