L.7.2.4 Embeddings in a SpreadsheetML Document

When an embedding is present in a SpreadsheetML document, it must be stored as follows:

In the worksheet, the oleObjects element must store one or more oleObject child elements, one for each embedding within the current worksheet. Each of those oleObject child elements must also store: an explicit relationship to the associated Embedded Package or Embedded Object part, the ProgID for that embedded object, and (optionally) the ID for the associated shape. [Note: For backward compatibility, note that VML shape IDs are of the form _x0000_s####, where # specifies a single Arabic numeral, and only the last four digits are stored as the ID. end note] In the worksheet, the sibling objectPr element must contain an explicit relationship to the Drawing part that (optionally) contains the image data which can be used in place of loading the actual object data.

For example, if we embed a Example Test object (an example for illustration) in a SpreadsheetML document, the following markup would be stored in the appropriate Sheet part:

<s:worksheet>
  <s:oleObjects>
    <s:oleObject progId="Example.Test.1" shapeId="1025" r:id="rId5">
      <s:objectPr cf="pict" r:id="rId9"> ... </s:objectPr>
    </s:oleObject>
  </s:oleObjects>
</s:worksheet>

If we examine this markup, it can be seen that:

The oleObject element specifies that we have one embedded object on the worksheet. Its attributes specify that the object is of type Example.Test.1 and that the explicit relationship to the embedded object is rId5. The child objectPr element specifies that the Drawing part which contains the associated drawing data is contained at the target of the relationship with an ID of rId9. If we examine the Drawing part’s contents, we’ll see shape 10, which contains the alternate image for the object.

Last updated on