12.3.9 External Workbook References Part

12.3.9 External Workbook References Part

Content Type:

application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml

Root Namespace:

http://purl.oclc.org/ooxml/spreadsheetml/main

Source Relationship:

http://purl.oclc.org/ooxml/officeDocument/relationships/externalLink

An instance of this part specifies information about data referenced in other SpreadsheetML packages.

[Example: Consider two workbooks, wb1 and wb2, stored in packages called wb1.xlsx and wb2.xlsx, respectively. The value of a cell on a worksheet in wb1 can be computed using the value of one or more cells in wb2. This is done by having wb1 contain an external reference to wb2. end example]

A package is permitted to contain one or more External Workbook References parts, and those parts shall be the target of an explicit relationship in the Workbook part (12.3.23).

[Example: A Workbook part for wb1 contains the following, which indicates that somewhere in its three worksheets, an external reference is made to a target specified in relationship id rId4 of the part’s relationship item:

<workbook xmlns:r="…"/>
  <sheets>
    <sheet name="Sheet1"
    <sheet name="Sheet2"
    <sheet name="Sheet3"
  </sheets>
  <externalReferences>
    <externalReference r:id="rId4"/>
  </externalReferences>
</workbook>

That part’s relationship item contains the following:

<Relationships xmlns="…">
  <Relationship Id="rId4"
    Type="http://…/externalLink"
    Target="externalReferences/externalReference1.xml"/>
</Relationships>

end example]

The root element for a part of this content type shall be externalLink.

[Example: externalReference1.xml contains:

<externalLink xmlns:r="…"  r:id="rId1">
  <externalBook>
    <sheetNames>
      <sheetName val="Sheet1"/>
      <sheetName val="Sheet2"/>
      <sheetName val="Sheet3"/>
    </sheetNames>
    <sheetDataSet>
      <sheetData sheetId="0">
        <row r="7">
          <cell r="C8">
            <v>0</v>
          </cell>
        </row>
      </sheetData>
      <sheetData sheetId="1"/>
      <sheetData sheetId="2"/>
    </sheetDataSet>
  </externalBook>
</externalLink>

This part’s relationship item contains the following:

<Relationships >
  <Relationship Id="rId1"
    Type="…/externalReference"
    Target="wb2.xlsx" TargetMode="External"/>
</Relationships>

where wb2.xlsx is the workbook in which one or more cells’ values are used in calculating the values of a cell in workbook wb1. end example]

An External Workbook References part shall be located within the package containing the relationships part (expressed syntactically, the TargetMode attribute of the Relationship element shall be Internal).

An External Workbook References part shall specify an explicit relationship to one or more External Workbooks (12.4).

An External Workbook References part shall not have any implicit or explicit relationships to other parts defined by ISO/IEC 29500.

Last updated on