Chart axis step brokes when book saved

Hello


I have founded, that axis step brokes, when workbook resaved by Aspose.Cells.

In attached template we have a chart with axis step = “Month”, but when i just open and resave workbook to another file, axis step brokes to “Day”.

public void axisTest() throws Exception {
Workbook wb = new Workbook(“D:\chart.xlsx”);

wb.save(“D:\out.xlsx”);
}

Best regards. Alexey

Hi,


Thanks for the template file.

After an initial test, I observed the issue as you mentioned by using your template
file with the following sample code. The chart’s category axis major
units and minor units with scale broke when workbook is re-saved.


e.g


Sample code:


Workbook wb = new Workbook("chart.xlsx");


//I even tried to set it manually but in vain.
//Chart chart = wb.getWorksheets().get(0).getCharts().get(0);

//chart.getCategoryAxis().setMajorUnit(1);
//chart.getCategoryAxis().setMinorUnit(1);
//chart.getCategoryAxis().setMajorUnitScale(TimeUnit.MONTHS);

//chart.calculate();

wb.save("out1.xlsx");

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

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

Thank you.

Hello guys. There is exists some changes about this issue?

Hi Alexey,

Thanks for your posting and using Aspose.Cells.

We
are afraid, there is no update for you. Please spare us some more time a
week or two. Hopefully, your issue will be resolved in this time span.
Once, there is some fix or other update for you, we will let you know
asap.

Hi Alexey,

Thanks for using Aspose.Cells.

We have fixed
this issue now. We will provide you a fix in couple of days after
incorporating other enhancements and fixes and conducting some extensive
testing. Once, it is available for you, we will let you know asap by
posting in this thread.

Hi,


Please try our latest fix/version: Aspose.Cells for Java v8.2.2.1

We have fixed your issue now.

Let us know your feedback.

Thank you.

Hello guys.


In simple example it works now. But he have found another case, when this issue appears agins. When we copy worksheet into another workbook, axis step brokes agains. There us examoke. You could use chart.xlsx from previous case

public void copyWorksheetTest() throws Exception {
Workbook source = new Workbook(“D://chart.xlsx”);
Workbook target = new Workbook();

for (int iCount = 0; iCount < source.getWorksheets().getCount(); iCount++) {
//Формируем имя листа, если такой лист уже есть, то переименовываем
String newSheetName = source.getWorksheets().get(iCount).getName();
target.getWorksheets().add(newSheetName);
}

for (int iCount = 0; iCount < source.getWorksheets().getCount(); iCount++) {
Worksheet sourceWs = source.getWorksheets().get(iCount);
Worksheet targetWs = target.getWorksheets().get(sourceWs.getName());
try {
targetWs.copy(sourceWs);
targetWs.getPageSetup().setPrintArea(sourceWs.getPageSetup().getPrintArea());
} catch (Exception e) {
Assert.assertNull(e);
}
}

target.save(“D://out.xlsx”);
}

Best regards. Alexey

Hi Alexey,

Thanks for your feedback and using Aspose.Cells.

We were able to observe this issue after executing your sample code with your provided source Excel file using the latest version: Aspose.Cells
for Java v8.2.2.1
. Chart axis steps broke after copying worksheet.

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-41066 - Chart axis steps broke after copying worksheet

I have attached the output Excel file generated by the code for a reference

Hi Alexey,

Thanks for using Aspose.Cells.

We have fixed
this issue now. We will provide you a fix in couple of days after
incorporating other enhancements and fixes. Once, it is available for you, we will let you know asap by
posting in this thread.

Hi,

Thanks for using Aspose.Cells for Java.

We have fixed this issue.

  • CELLSJAVA-41066 - Chart axis steps broke after copying worksheet

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

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


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