After upgrading to the latest version of Aspose.Total for .NET I’m unable to extract data behind linked charts, it only seems to work with embedded ones.
I have attached an example (.pptx) file which includes an embedded chart on slide 2 and two linked charts on slide 3. Previously I was able to extract the chart’s data, even if the linked file wasn’t available.
I have observed your comments. Can you please share which version of Aspose.Slides you have upgraded to on your end.
I am unable to understand this question. Can you please share the details in the form of sample project , source file and generated output with us so that we may investigate it further on our end.
We have upgraded to Aspose.Slides for .NET 20.2.0, Please find below a sample project, Input file and generated console Output screenshots for your investigations.
I have worked with the sample project shared by you using Aspose.Slides for .NET 20.2. I have not been able to observe any issue. You probably are using API without valid license. When you use API without license, you can access limited API features. I suggest you to please try using license of Aspose.Slides on your end. image.png (23.9 KB)
As mentioned in my previous post, did you edit the Aspose.csproj file to swap the PackageReference Include Aspose.Slides for .NET to Version 20.2.0?
I know it works when using PackageReference Include Aspose.Slides for .NET Version 15.9.0; I only get the “System.InvalidOperationException: External workbook is not available or can’t be loaded” error when using Version 20.2.0.
I have a valid Aspose.Total for .NET Developer OEM licence.
Please find below a new version of the sample project which uses Aspose.Slides for .NET version 20.2.0, if you download and run this you should be able to observe the issue reported in my previous post.
I have tested the new sample project shared by you and have been able to observe the issue. An issue with ID SLIDESNET-41808 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.
We have investigated the requirements on our end. Latest versions of Aspose.Slides behave the same way as PowerPoint does. If linked workbook cannot be reached out from PP it’s not accessible from Aspose.Slides either.
Can you please clarify if that workbook is existing and available on your side?
The workbook isn’t available. However, when we were using version 15.9.0 we were still able to get the data from the chart, even when the workbook wasn’t available through PowerPoint.
When we upgraded to version 20.2.0 we started getting the "System.InvalidOperationException: External workbook is not available or can’t be loaded” For powerpoints and charts that used to work.
If you run this sample project that uses V15.9 you won’t encounter the error. AsposeTableDataIssue.zip (67.9 KB)
However, if you run this sample project that uses V20.2 you will encounter the error
We have added ISpreadsheetOptions.RecoverWorkbookFromChartCache property. If data source for the chart is an external workbook and it’s not available, it will be recovered from the chart cache using this property.
LoadOptions lo = new LoadOptions();
lo.SpreadsheetOptions.RecoverWorkbookFromChartCache = true;
using (Presentation pres = new Presentation("Presentation.pptx", lo))
{
IChart chart = pres.Slides[0].Shapes[0] as IChart;
IChartDataWorkbook wb = chart.ChartData.ChartDataWorkbook;
...
}