Sparkline will throw NullPointerException when insertRows

Workbook wb = new Workbook("c:/aspose/SparkInsertRows.xlsx");
Workbook newWb = new Workbook();
newWb.copy(wb);
newWb.getWorksheets().get(0).getCells().insertRows(6, 2);



Exception in thread "main" java.lang.NullPointerException
at com.aspose.cells.Sparkline.a(Unknown Source)
at com.aspose.cells.SparklineCollection.a(Unknown Source)
at com.aspose.cells.SparklineGroup.a(Unknown Source)
at com.aspose.cells.SparklineGroupCollection.a(Unknown Source)
at com.aspose.cells.Cells.a(Unknown Source)



I use cells-8.2.0.1

Hi,


Thanks for providing us template file and sample code.

After an initial test, I observed the issue as you mentioned by using your sample code with your template file. I got the exception:
Exception in thread “main” java.lang.NullPointerException
at com.aspose.cells.Sparkline.a(Unknown Source)
at com.aspose.cells.SparklineCollection.a(Unknown Source)
at com.aspose.cells.SparklineGroup.a(Unknown Source)
at com.aspose.cells.SparklineGroupCollection.a(Unknown Source)
at com.aspose.cells.Cells.a(Unknown Source)

e.g
Sample code:

Workbook wb = new Workbook(“SparkInsertRows.xlsx”);
Workbook newWb = new Workbook();
newWb.copy(wb);
newWb.getWorksheets().get(0).getCells().insertRows(6, 2);

I have logged a ticket with an id “CELLSJAVA-40976” for your issue. We will look into it soon.

Once we have any update on it, we will let you know here.

Thank you.

Hi,

Thanks for using Aspose.Cells for Java.

Please download and try this fix: Aspose.Cells for Java v8.2.0.3 and let us know your feedback.

The issues you have found earlier (filed as CELLSJAVA-40976) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.