Free Support Forum - aspose.com

Save xlsx wrong

System.out.println(CellsHelper.getVersion());
Workbook wb = new Workbook("C:/社交媒体ROI分析.xlsx");
Chart chart = wb.getWorksheets().get(0).getCharts().get(0);
SeriesCollection nSeries = chart.getNSeries();
for (int i = 0; i < nSeries.getCount(); i++) {
DataLabels labels = nSeries.get(i).getDataLabels();
labels.setPosition(labels.getPosition());
}
wb.save("C:/社交媒体ROI分析3.xlsx");

The result xlsx will show a warning dialog when open by ms excel

Hi,


Thanks for your posting and using Aspose.Cells.

We have tested your issue with the following sample code using the latest version and found the issue as per your description. Output file gets corrupt after executing DataLabels.setPosition() method.

We have logged this issue in our database for investigation. 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-42112 - Output file gets corrupt after executing DataLabels.setPosition() method


I have also attached the output excel file and the screenshot showing the corruption of the output file for a reference.

Java
System.out.println(CellsHelper.getVersion());
Workbook wb = new Workbook(dirPath + “a.xlsx”);
Chart chart = wb.getWorksheets().get(0).getCharts().get(0);
SeriesCollection nSeries = chart.getNSeries();
for (int i = 0; i < nSeries.getCount(); i++) {
DataLabels labels = nSeries.get(i).getDataLabels();
labels.setPosition(labels.getPosition());
}

wb.save(dirPath + “a_out.xlsx”);


Hi again,


This is to update you that we have resolved the problem logged earlier as CELLSJAVA-42112. We will shortly share the fix here for your testing.
Hi,

Thanks for using Aspose.Cells.

Please download and try the latest fix: Aspose.Cells for Java v16.12.1 and let us know your feedback.

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


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