We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Not support use cell value setting in chart data label

Workbook wb = new Workbook("c:/BiaoQian2.xlsx");
wb.save("c:/BiaoQian2.html");

It output error image.

But use Excel 2013 export is OK.

chart_Sheet1_0.png exported by aspose

image001.png exported by excel 2013

Hi Xiong,

Thanks for your posting and using Aspose.Cells.

We were able to observe this issue. However, Excel 2010 shows the same image as generated by Aspose.Cells while Excel 2013 shows the data labels instead of [CELLRANGE].

I have attached the screenshots for your reference.

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-41094 - [CELLRANGE] is showing instead of correct data labels inside the chart image

We have tested this issue with the following code and also attached the output HTML generated by it for a reference.

Java

String filePath = “F:\Shak-Data-RW\Downloads\BiaoQian2.xlsx”;


Workbook workbook = new Workbook(filePath);

workbook.save(filePath + “.out.html”);

Hi,

Thanks for using Aspose.Cells for Java.

Please try the new fix for rendering cell range datalabels.

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

It work fine.


But I want to get the cell range of datalabels

Workbook wb = new Workbook(“c:/BiaoQian2.xlsx”);
Chart chart = wb.getWorksheets().get(0).getCharts().get(0);
Series series = chart.getNSeries().get(0);
System.out.println(series.getDataLabels().getShowCellRange());


This return true.

How can I get the cell range of them? like E5:E7

Hi Xiong,

Thanks for your posting and using Aspose.Cells.

Please use DataLabels.getLinkedSource() to get the range of Data Labels. Please see the following code and its console output for your reference.

Java


String filePath = “F:\Shak-Data-RW\Downloads\BiaoQian2.xlsx”;


Workbook workbook = new Workbook(filePath);


Worksheet worksheet = workbook.getWorksheets().get(0);


Chart chart = worksheet.getCharts().get(0);


String cellRangeOfDatalabels = chart.getNSeries().get(0).getDataLabels().getLinkedSource();


System.out.println(cellRangeOfDatalabels);
Console Output:
=Sheet1!$E$5:$E$7

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


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