You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a presentation layer and a Data sheet that powers the prettier presentation sheet (there are also custom fonts associated here). Within the presentation, there are two rows of interest:
THE HERSEY CO: $123
MARS INC: $456
I run the below code, primarily if not exclusively using the OpenXML code to open the PPTX, get inside the Excel object, update the data for these two rows, save and close. However, when I re-open the file again, the object does not appear updated but when I double click on the object, then and only then, does the data "snap" to the correct values.
Is it possible I am not setting an "AutoUpdate" flag correctly or not calling something to have this updated before a user needs to open the file and double click?
NuGet Packages Used (some of these are not used in the code example)
Can you please simplify this repro? There's too much going on to identify what the issue is. Make sure you're disposing everything that needs to be (doesn't look like you dispose the presentation). We can't try this out as it requires an input file it seems.
What you are seeing is expected behaviour. PowerPoint uses a cached presentation image to display the data. For embedded OLE objects, PowerPoint assumes that the OLE data and image are synchronised when loaded from a file. There is no data to detect if they are out of sync. To update it at the start, PowerPoint would need to start all OLE servers upon opening and re-render the images, which would be very slow and significantly slow down the opening process. Additionally, this approach would not work when the presentation is opened in a browser. There is no setting or option to update the cached image when the presentation is loaded.
Unless you have a third-party library or your own implementation to render the image after modifying the Excel workbook (or can run a VBA script, which would require having Excel installed), there is no way to refresh it at the start, and the user will have to double-click the embedding after loading the modified deck.
Please do let me know if that answer your question or else please clarify further. Thanks
Describe the bug
I have a power point presentation with charts powered by data in an excel OLE object.
valentineschocolates.pptx
There is a presentation layer and a
Data
sheet that powers the prettier presentation sheet (there are also custom fonts associated here). Within the presentation, there are two rows of interest:THE HERSEY CO: $123
MARS INC: $456
I run the below code, primarily if not exclusively using the OpenXML code to open the PPTX, get inside the Excel object, update the data for these two rows, save and close. However, when I re-open the file again, the object does not appear updated but when I double click on the object, then and only then, does the data "snap" to the correct values.
Is it possible I am not setting an "AutoUpdate" flag correctly or not calling something to have this updated before a user needs to open the file and double click?
NuGet Packages Used (some of these are not used in the code example)
Code
The text was updated successfully, but these errors were encountered: