public class SparklineCollection extends CollectionBase
Sparkline objects.
Example
Workbook book = new Workbook();
Worksheet sheet = book.getWorksheets().get(0);
sheet.getCells().get("A1").putValue(5);
sheet.getCells().get("B1").putValue(2);
sheet.getCells().get("C1").putValue(1);
sheet.getCells().get("D1").putValue(3);
// Define the CellArea
CellArea ca = new CellArea();
ca.StartColumn = 4;
ca.EndColumn = 4;
ca.StartRow = 0;
ca.EndRow = 0;
int idx = sheet.getSparklineGroups().add(com.aspose.cells.SparklineType.LINE, sheet.getName() + "!A1:D1", false, ca);
SparklineGroup group = sheet.getSparklineGroups().get(idx);
group.getSparklines().add(sheet.getName() + "!A1:D1", 0, 4);
book.save("output.xlsx", SaveFormat.XLSX);
| Modifier and Type | Method and Description |
|---|---|
int |
add(java.lang.String dataRange,
int row,
int column)
Add a sparkline.
|
Sparkline |
get(int index)
Gets the
Sparkline element at the specified index. |
void |
remove(java.lang.Object o)
Removes the sparkline
|
public Sparkline get(int index)
Sparkline element at the specified index.get in class CollectionBaseindex - The zero based index of the element.public int add(java.lang.String dataRange,
int row,
int column)
dataRange - Specifies the new data range of the sparkline.row - The row index of the location.column - The column index of the location.public void remove(java.lang.Object o)
o - See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.