Aspose does not apply correctly the line style on chart lines for XLSX format

Hello,

I have a chart (type line) in my Excel sheet, and I want to have a different line type for my series, i.e. I want a solid line for my first serie, and a dashed one for the second serie.

Let’s consider the following code:

Workbook workbook = new Workbook();
Worksheet ws = workbook.getWorksheets().getSheet(0);
// Fill with some values
Cells cells = ws.getCells();
Random r = new Random();
for (int i = 1; i < 10; i++) {
cells.getCell(“A” + i).setValue(i);
cells.getCell(“B” + i).setValue(r.nextInt(10));
cells.getCell(“C” + i).setValue(r.nextInt(50));
}
Chart chart = ws.getCharts().addChart(ChartType.LINE, 5, 1, 20, 10);
chart.getNSeries().add(“B1:C9”, true);
// Apply different types of Lines type
chart.getNSeries().get(0).getBorder().setStyle(LineType.SOLID);
chart.getNSeries().get(1).getBorder().setStyle(LineType.DASH);

workbook.save(“c:\test2.xls”, FileFormatType.EXCEL97TO2003);
workbook.save(“c:\test2.xlsx”, FileFormatType.XLSX);

If I open test2.xls, the two lines have different styles, while on the XLSX format, both lines are identical.

Aspose Cells version used is 2.5.4.1.

Thanks in advance.


Hi,

Thanks for your reporting.

I have run your code and see the problem using the latest version of Aspose.Cells for Java v2.5.4.2. I have attached the output files.

I have logged this issue in our database. We will let you know once it is fixed or if something missing in your code, we will update you.

This issue has been logged as CELLSJAVA-28165.

Hi,

We have fixed this issue. Please download Aspose.Cells for Java v2.5.4.5.

Hello,

Tested and approved! Once again, thanks for your quick reply and correction!

Regards.

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


This message was posted using Notification2Forum from Downloads module by aspose.notifier.