Greetings, this one may be a little heavy, but I am at a loss what to do and believe the problem is with the Aspose Libraries. A little definition on our current setup:
We have a Powerpoint File with underlying Excel objects to store data, these excel objects power chart objects that was used in the PowerPoint presentation. We use a separate library to update the excel data, and then we call Aspose libraries with various refresh methods.
We are able to verify the data is successfully updated
But we notice that the objects do not appear refreshed. It only updates once a user opens the file, double clicks on the charts, opens the objects up, only then does the data refresh.
The C# project we use makes use of the following Nuget Packages
Here is a standalone code, run this an observe in the chart:
Dollar Sales for “The Hersey CO” is changed from $123 to [$453,137]
Dollar sales for “Mars INC” is changed from $456 to [$163,497]
The Display tab is “Sheet1” but it references underlying data in the “Data” tab. I think I am missing a part here or doing something wrong but I am at my wit’s end.
@BK.Broiler.730,
Thank you for your patience. Unfortunately, your code example does not use Aspose.Slides. Could you please share a minimal standalone project that reproduces the problem with Aspose.Slides?
Hello, Yes, both Aspose.Slides and Aspose.cells are used in the standalone example given, Slides is used on lines such as:
foreach (ISlide slide in ap.Slides)
{
IEnumerable<IShape> potentialCharts = slide.Shapes.Where(s => s is OleObjectFrame);
foreach (IShape slideShape in potentialCharts)
We then use Aspose.Cells to call the refresh methods.
You load the presentation as the ap object but the presentation is not saved anywhere after changes. Please note that the ap object does not change the ReportStream data (it reads only).
I commented out the code part in the “Refresh things using Aspose” section and got the same results.
Yes, you are correct, I am failing to save the document. I spent so much time trying to make as faithful of a replicate to our environment I failed to see we technically save the stream at another point in the code.
So I save a copy and just add “2” to the file name. When I run this, the same issue persist where the object/chart toward the bottom needs to be opened in order for the data to be refreshed. Perhaps I am not calling the save code correctly?
@BK.Broiler.730,
Thank you for the details. As I mentioned above, the issue persists without the code related to Aspose.Slides. You should isolate the problem in your code.