Sub-charts are not accessible

It appears that when processing chart sheets containing multiple charts, only one of the charts is accessible via the Aspose Cells API and only one chart can be rendered.

Steps to reproduce:
  1. Create a blank Excel workbook (store as C:\book1.xlsx, or use the attached file).
  2. Add a chart sheet to the workbook
  3. Add 2 charts to the chart sheet (it should now contain a total of 3 charts -- the "root"/container chart, which in turn contains the 2 other charts with actual content).
  4. Run the code below

Expected outcome:
The file C:\temp.bmp should match the displayed content of the chart sheet as seen in Excel

Actual outcome:
The file C:\temp.bmp contains only the "root"/container chart, and not its sub-charts.

Code (C#):
var wb = new Workbook("C:\\book1.xlsx");
var ws = wb.Worksheets[0]; // Note: ws.Charts.Count == 1, so I can't iterate over the sub-charts, nor is there a ws.Charts[0].Charts collection to iterate through...
var options = new Aspose.Cells.Rendering.ImageOrPrintOptions();
var sr = new Aspose.Cells.Rendering.SheetRender(ws, options);
sr.ToImage(0, "C:\\temp.bmp");

Hi,


Thank you for using Aspose.Cells

We will investigate the issue as you have mentioned and provide further assistance soon.

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

I noticed the problem using the latest version:
Aspose.Cells
for .NET v7.2.2.3



We have logged this issue in our database. We will look into this issue and 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 CELLSNET-40808.

Please see the code below and its output image for your reference.

C#


string filePath = @“F:\Shak-Data-RW\Downloads\Book1.xlsx”;


var wb = new Workbook(filePath);

var ws = wb.Worksheets[“chart2”]; // Note: ws.Charts.Count == 1, so I can’t iterate over the sub-charts, nor is there a ws.Charts[0].Charts collection to iterate through…

var options = new Aspose.Cells.Rendering.ImageOrPrintOptions();

options.OnePagePerSheet = true;


var sr = new Aspose.Cells.Rendering.SheetRender(ws, options);

sr.ToImage(0, filePath + “.bmp”);


Hi,

Thanks for using Aspose.Cells.

We have fixed this issue.

Please download and try this fix: Aspose.Cells for .NET v7.3.0.5 and let us know your feedback.

It works like a charm. Thanks a lot, you guys rock :slight_smile:

Hi,

Thanks for your comments and feedback.

It’s good to know your issue is resolved with the above fix.

If you face any other issue, please feel free to post, we will be glad to help you asap.

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


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