Hi,
Hi,
Thanks for your posting and using Aspose.Cells for Java.
We were able to replicate this exception using the latest version: Aspose.Cells
for Java v7.5.3.2 with the following code and using your source file. We have logged this issue in our database. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as CELLSJAVA-40621.
Java
String sourcePath = “F:\Shak-Data-RW\Downloads\test.xls”;
Workbook workbook = new Workbook(sourcePath);
ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();
imgOptions.setImageFormat(ImageFormat.getJpeg());
imgOptions.setOnePagePerSheet(true);
Worksheet worksheet = workbook.getWorksheets().get(0);
Chart chart = worksheet.getCharts().get(0);
chart.toImage(sourcePath + “.out.jpg”, imgOptions);
Exception in thread "main" java.lang.NullPointerException
at com.aspose.cells.gk.a(Unknown Source)
at com.aspose.cells.gk.a(Unknown Source)
at com.aspose.cells.gk.e(Unknown Source)
at com.aspose.cells.gk.f(Unknown Source)
at com.aspose.cells.gk.a(Unknown Source)
at com.aspose.cells.gk.a(Unknown Source)
at com.aspose.cells.gk.a(Unknown Source)
at com.aspose.cells.Chart.toImage(Unknown Source)
at ClsAsposeTest.f1(ClsAsposeTest.java:58)
at ClsAsposeTest.main(ClsAsposeTest.java:28)
Hi,
HI,
Hi Ashish,
Thanks for your posting and using Aspose.Cells for Java.
Could you provide us sample code replicating this exception with the latest version? We have tested your issue with the following sample codes and it did not throw any exception. We have also attached the output images for your reference.
Java
Workbook workbook = new Workbook(path);
Worksheet worksheet = workbook.getWorksheets().get(0);
ImageOrPrintOptions options = new ImageOrPrintOptions();
options.setOnePagePerSheet(true);
options.setImageFormat(ImageFormat.getPng());
SheetRender sr = new SheetRender(worksheet, options);
sr.toImage(0, new FileOutputStream(path + “.out.png”));
ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();
imgOptions.setImageFormat(ImageFormat.getJpeg());
imgOptions.setOnePagePerSheet(true);
Worksheet worksheet = workbook.getWorksheets().get(0);
Chart chart = worksheet.getCharts().get(0);
chart.toImage(sourcePath + ".out.jpg", imgOptions);
Hi,
Hi Ashish,
Thanks for your posting and using Aspose.Cells.
Now, we are able to replicate this exception using the following code. We have logged this issue in our database. We will look into it and resolve it. Once, the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as CELLSJAVA-40633.
Java
Workbook workbook = new Workbook(path);
Worksheet worksheet = workbook.getWorksheets().get(0);
ImageOrPrintOptions options = new ImageOrPrintOptions();
options.setOnePagePerSheet(false);
options.setImageFormat(ImageFormat.getPng());
SheetRender sr = new SheetRender(worksheet, options);
sr.toImage(0, new FileOutputStream(path + “.out.png”));
Exception in thread "main" java.lang.NegativeArraySizeException
at com.aspose.cells.PivotTable.getHorizontalBreaks(Unknown Source)
at com.aspose.cells.nr.a(Unknown Source)
at com.aspose.cells.nr.b(Unknown Source)
at com.aspose.cells.nr.a(Unknown Source)
at com.aspose.cells.nr.a(Unknown Source)
at com.aspose.cells.bdi.a(Unknown Source)
at com.aspose.cells.SheetRender.(Unknown Source)
at ClsAsposeTest.Sheet2Image(ClsAsposeTest.java:66)
at ClsAsposeTest.f1(ClsAsposeTest.java:49)
at ClsAsposeTest.main(ClsAsposeTest.java:28)
The issues you have found earlier (filed as CELLSJAVA-40621;CELLSJAVA-40633) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
Hi,