none
How to force update of preview images for embedded files in Open XML RRS feed

  • Question

  • The base scenario is the following.

    I have a pptx file, that contains an xlsx file as an embedded object. The pptx shows a preview of the xlsx table, and double clicking on the table opens it in excel, and allows editing. When the excel is saved and closed, the preview image is also updated.

    If I unpack the pptx file, edit the embedded excel object outside power point and repack the pptx content, then opening the pptx file shows me the old preview image (the content of the table before the manual edit).

    Is there a way to manipulate the content of the pptx file, such that when it is opened in PowerPoint, all preview images are forced to be regenerated?

    Friday, November 20, 2015 12:24 PM

Answers

  • Hello Sandor,

    I have reviewed the information that you provided and here are my findings based on the reading of the relevant specification documents [ISO/IEC 29500-1:2012] and [MS-OI29500].

    The relevant elements that are being used are:
    19.3.2.4 oleObj (Global Element for Embedded objects and Controls)
    19.3.1.4 blipFill (Picture Fill)
    19.3.1.37 pic (Picture)

    Other relevant sections:
    15.2.10 Embedded Object Part
    15.2.11 Embedded Package Part
    L.7.2 Embeddings
    L.7.2.5 Embeddings in a PresentationML Document
    9.2 Relationships in Office Open XML

    The embedding is defined by the oleObj tag to identify either an Embedded Package or an Embedded Object. In each case section L.7.2.5 states that " The oleObj element shall have a pic child element that (optionally) contains the image data to be used in place of loading the actual object data." The pic element contains the blipFill element which in turn references a relationship - <a:blip r:embed="rId4"/>. This relationship rId4 references an EMF file that is contained in the package (slide1.xml.rels):

    <Relationships …>

    <Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="../media/image1.emf"/>
    </Relationships>

    Since the image is already embedded in the package and referenced directly, it is expected that it should accurately represent the embedded package/object so that it can be displayed by the presentation engine instead of loading the object data.

    Section L.7.2 further states that " Office Open XML also allows an image to be optionally associated with the embedded object data, for use when the embedded object application and data itself is not used by the consuming application (e.g. when the object cannot be loaded – the object is from an unknown source; the object is known, but the application has chosen not to load it for performance reasons, and so on)."

    I am reading this as stating that the application (which might be PowerPoint or another presentation application altogether) chooses when to load the embedded package with the appropriate engine (which similarly might or might not be an Excel application). How these applications interact together to produce the image representation is not described by the specification as it is not related to how the elements should be interpreted but how the engines choose interact and how to write the elements into the resulting documents. I find no elements or attributes in the above referenced elements to inform the presentation engine that it should load the embedded package engine for the contained resources.

    Please let me know your thoughts on this.

    Thanks,
    Kamil Sykora

    Wednesday, December 2, 2015 1:30 PM

All replies

  • Sandor,

    Thank you for your question.  An engineer from the Protocols team will contact you soon.


    Bryan S. Burgin Senior Escalation Engineer Microsoft Protocol Open Specifications Team

    Friday, November 20, 2015 5:03 PM
    Moderator
  • Hello Sandor :

    I was testing your scenario where I embedded an excel file in pptx and selected 'link' option while embedding this excel file. After that, I closed pptx file, edited linked excel file and then reopened pptx file again. On reopening pptx file, we get security notice to 'Update Links' so that preview can be refreshed to reflect changes made to embedded excel file. So when it comes to Microsoft PowerPoint, it will do it for you.

    I assume that you want to understand how this 'Update Links' work and if there is any flag/entries in pptx file format that can force it. Is this understanding correct ?

    Regards.


    Tarun Chopra | Escalation Engineer | Open Specifications Support Team

    Friday, November 20, 2015 5:33 PM
  • Hello Tarun,

    Thanks for looking into this so quickly. When you embed the xlsx file as an object, don't choose the link option. Let the file be embedded properly into the pptx (if you look into the pptx archive, you should see it under ppt/embeddings).

    Unpack this pptx archive, edit the xlsx file under the embeddings subfolder (if you open in excel, it will show nothing, but you can edit the shared strings in it manually as it is open x format). Then repacking the whole thing will give you a sound pptx.

    Opening this pptx will not show the changes you made in the embedded xlsx, however once you double click on it, it will update the preview.

    If you think it would help, I can send you a really minimal example of the base pptx and the tempered one, so you can look into it.

    Cheers,

    Sándor Kolumbán

    Friday, November 20, 2015 5:44 PM
  • Hello Sandor,

    I will be looking into this further. If you already have the minimal example, please do send it to dochelp@microsoft.com to my attention. I will review and provide feedback.

    Thanks,
    Kamil Sykora

    Friday, November 20, 2015 8:44 PM
  • Hello Kamil, you should have the email in your mailbox by now, titled 'to Kamil Sykora'.

    Cheers,

    Sándor

    Friday, November 20, 2015 8:50 PM
  • Hello Sandor,

    I was able to verify the behavior you described using the files you provided as well as reproduce the behavior by modifying the base.pptx using the steps you posted earlier. I am now researching the markup related to this.

    Thanks,
    Kamil Sykora

    Monday, November 23, 2015 6:20 PM
  • Hello Kamil,

    Thank you. Please let me know if you find something.

    Best regards,

    Sándor

    Monday, November 23, 2015 6:39 PM
  • Hello Sandor,

    I have reviewed the information that you provided and here are my findings based on the reading of the relevant specification documents [ISO/IEC 29500-1:2012] and [MS-OI29500].

    The relevant elements that are being used are:
    19.3.2.4 oleObj (Global Element for Embedded objects and Controls)
    19.3.1.4 blipFill (Picture Fill)
    19.3.1.37 pic (Picture)

    Other relevant sections:
    15.2.10 Embedded Object Part
    15.2.11 Embedded Package Part
    L.7.2 Embeddings
    L.7.2.5 Embeddings in a PresentationML Document
    9.2 Relationships in Office Open XML

    The embedding is defined by the oleObj tag to identify either an Embedded Package or an Embedded Object. In each case section L.7.2.5 states that " The oleObj element shall have a pic child element that (optionally) contains the image data to be used in place of loading the actual object data." The pic element contains the blipFill element which in turn references a relationship - <a:blip r:embed="rId4"/>. This relationship rId4 references an EMF file that is contained in the package (slide1.xml.rels):

    <Relationships …>

    <Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="../media/image1.emf"/>
    </Relationships>

    Since the image is already embedded in the package and referenced directly, it is expected that it should accurately represent the embedded package/object so that it can be displayed by the presentation engine instead of loading the object data.

    Section L.7.2 further states that " Office Open XML also allows an image to be optionally associated with the embedded object data, for use when the embedded object application and data itself is not used by the consuming application (e.g. when the object cannot be loaded – the object is from an unknown source; the object is known, but the application has chosen not to load it for performance reasons, and so on)."

    I am reading this as stating that the application (which might be PowerPoint or another presentation application altogether) chooses when to load the embedded package with the appropriate engine (which similarly might or might not be an Excel application). How these applications interact together to produce the image representation is not described by the specification as it is not related to how the elements should be interpreted but how the engines choose interact and how to write the elements into the resulting documents. I find no elements or attributes in the above referenced elements to inform the presentation engine that it should load the embedded package engine for the contained resources.

    Please let me know your thoughts on this.

    Thanks,
    Kamil Sykora

    Wednesday, December 2, 2015 1:30 PM
  • Hi Kamil,

      This was my impression also, that the markup just states that there is a preview image available and it is the editing application's responsibility to keep the data consistent. I.e. when the embedded excel is edited through ppt, the preview is created by ppt and saved. It is specific to ppt, what sort of preview it wants to put there.

      Thanks, I think I can come to terms with this fact.

    Cheers,

      Kolumbán

    Wednesday, December 2, 2015 1:57 PM