Hi Aspose Team,
I am using Aspose Slides for .NET version 22.11.0. I am trying to to get the chart data cells information which is present in one of our slide. It is throwing some exception.
OS Version on which Code executed: Windows 10 Enterprise 64-bit
.NET FrameworkVersion: 4.8
Please find attached PPT and error screenshot.
public void ReadChartData()
{
try
{
string path = @"C:\Users\admin\\Report.pptx";
byte[] byteFile = System.IO.File.ReadAllBytes(path);
MemoryStream reportTemplateStream = new MemoryStream(byteFile);
using (Presentation presentation = new Presentation(reportTemplateStream))
{
ISlide slide = presentation.Slides[0];
IChart currentChart = slide.Shapes[0] as IChart;
IChartData chartData = currentChart.ChartData;
IChartDataWorkbook chartWorkbook = chartData.ChartDataWorkbook;
//Above line throwing an exception
}
}
catch (Exception ex) { }
}
Error.PNG (9.9 KB)
Report.zip (35.5 KB)
Note: Kindly change the path in sample code as per your need