none
Copying powerpoint presentation to Sharepoint-Online corrupts XML Data RRS feed

  • Question

  • Hello,

    we received a Powerpoint Presentation from our customer from his Sharepoint online server and wanted to place it with our Powerpoint AddIn on our SharePoint Online. The AddIn adds some customXmls to the presentation and finally using a simple File.Copy command it copies the presentation to a Sharepoint folder which is accessed by webDAV.

    When I try to open the presentation file from Sharepoint with the Open XML SDK 2.5 Productivity Tool For Microsoft Office it shows the message: "Cannot open file: The file contains corrupt data.

    The depending source presentation file can be opened with the productivity tool without any problems.

    Both presentation can be opened with Powerpoint without any problems

    Are there any known problems taking a presentation from one Sharepoint Online to another?

    Are there further tools to find out WHAT is wrong with file. 

    Thank you for your help,

    Karl


    • Edited by Kalle42 Monday, September 16, 2019 3:33 PM
    Monday, September 16, 2019 3:33 PM

All replies

  • Hello again,

    After further investigations, I can make it little bit more concrete:

    It's probably an unfortunate chain of circumstances.
    It starts with the Powerpoint Presentation Master. If the presentations are generated from a clean master that previously had all customXml parts removed using "Inspect presentation - Check for issues", the following editing chain (as described above) will work without any problems: Creating a presentation from the master, editing the presentation with the creation of new CustomXml parts, copy the presentation to the SharePoint server.

    Unfortunately, in our system, the masters are distributed to the users through the Sharepoint server. The Sharepoint provides the master file with four of its own customXml parts. There is a 4th file for this customer, which presumably defines event receivers.

    If this master is used, you will not notice a difference until copying. Also the manipulated file with additional customXml parts added by our AddIn can be easily opened both directly from Powerpoint and for example with the Open XML SDK 2.5 Productivity Tool.

    After the presentation file has been copied to Sharepoint using a WebDAV directory, it can be opened with Powerpoint. But not with the Productivity Tool. Also on the program side you get the error message "Can not open file: The file contains corrupted data."
     
    When opened with a zip program (7z), the file contains a [Trash] folder at the top level that can not be deleted either.

    If the file is opened with PowerPoint and saved under a different name, this file can also be opened again with the Productivity Tool. The [Trash] folder has disappeared when opened again with the Zip program.
    Powerpoint seems to be ignoring and / or fixing the bug that causes the OpenXML SDK to commit a fatal error. Unfortunately, you only get the message that there is an error, but not what was going wrong.

    Conclusion: The error only occurs if the master has previously been located on the customer's SharePoint server and has received the customXml parts of the Sharepoint server. When the presentations generated on the basis of this master then return to the Sharepoint, they at least break for the OpenXML SDK.

    About help or even just an idea, which triggers this error, I would be very happy. For analysis, I can provide sample files.
    Also a tip for a better analysis tool is very welcome ...

    Best regards,
    Kalle



    Friday, October 11, 2019 3:07 PM