I’m working with Aspose Cells 2.4 for Java and I’m having some trouble setting sparklines. This is the code:
CellArea ca = new CellArea();
for (int k2=5;k2<=100;k2++){
ca.setStartColumn(21);
ca.setEndColumn(21);
ca.setStartRow(k2);
ca.setEndRow(k2);
String range = "Q"+k2+",R"+k2+",S"+k2+",T"+k2;
int idx = sheet.getSparklineGroupCollection().add(SparklineType.LINE, range, false, ca);
SparklineGroup group = sheet.getSparklineGroupCollection().get(idx);
group.setSeriesColor(Color.RED);
}
I’m currently using Excel 2010. When I generate the file, the cells where sparklines are supposed to be are empty.
Thank you very much for your help and sorry for my English.
I could not find a way to make sparklines work but I made a short method to manually draw a 4 points sparkline. I’m working on making it n-point sparkline with a loop but I got this so far:
}