Exception in thread "main" java.lang.NullPointerException at org.apache.poi.xddf.usermodel.chart.XDDFChartData$Series.setTitle(XDDFChartData.java:122)
The code follows as below:
CellReference cellref = new CellReference("A6");
//A6 value = "My Title"
XDDFLineChartData.Series series3 = (XDDFLineChartData.Series)data.addSeries(xs, ys3);
series3.setMarkerSize((short) 6);
series3.setMarkerStyle(MarkerStyle.DIAMOND);
series3.setTitle("My Title",cellref);
I checked the documentation, it required a string for arg0
and a CellReference
for arg1
.
I keep ending up with a NullPointerException
. Am I missing something??
Thanks for the replies.