How to Get Sheet Count from Chart Data?

the IChartDataWorkbook the GetCell Overrides and the Clear Methods which all use the sheet index as Input but the interface does not have am method to read the worksheet count

the walkaround is currently to catch an ArgumentOutOfRangeException a few times

@jnvoigt,
Unfortunately, Aspose.Slides has not such a possibility. I’ve logged the issue in our tracking system with ID SLIDESNET-42579. Our development team will consider adding an appropriate API. As a workaround, I would suggest you using Aspose.Cells.

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

@jnvoigt,
A new property has been added to IChartDataWorkbook interface: Worksheets Property. Starting with version 21.9, you can get the sheet count from this property like this:

int sheetCount = chart.ChartData.ChartDataWorkbook.Worksheets.Count;