Query Table Part

Content Type:

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

Root Namespace:

http://schemas.openxmlformats.org/spreadsheetml/2006/main

Source Relationship:

http://schemas.openxmlformats.org/officeDocument/2006/relationships/queryTable

An instance of this part type contains information that describes how the source table is connected to an external data source, and defines the properties that is used when this table is refreshed from that source.

A package is permitted to contain one Query Table part per table, and each of those parts shall be the target of an implicit relationship from the corresponding Table Definitions (§12.3.21) part.

example:
<Relationships xmlns="…">
  <Relationship Id="rId1" 
    Type="http://…/queryTable" 
    Target="../queryTables/queryTable1.xml"/>
</Relationships>

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

example:
<queryTable  name="+Connect to New Data Source_1"
  growShrinkType="insertDelete" connectionId="2" autoFormatId="16" 
  applyNumberFormats="0" applyBorderFormats="0" applyFontFormats="1" 
  applyPatternFormats="1" applyAlignmentFormats="0"
  applyWidthHeightFormats="0">
  <queryTableRefresh nextId="8">
    <queryTableFields count="7">
      <queryTableField id="1" name="ACCOUNT"/>
      <queryTableField id="2" name="CHECKNUM"/>
      <queryTableField id="3" name="DATE"/>
      <queryTableField id="4" name="AMOUNT"/>
      <queryTableField id="5" name="PAYEE"/>
      <queryTableField id="6" name="CHARGECODE"/>
      <queryTableField id="7" name="DESCRIPT"/>
    </queryTableFields>
  </queryTableRefresh>
</queryTable> 

A Query Table part shall be located within the package containing the source relationship (expressed syntactically, the @TargetMode attribute of the <Relationship> element shall be Internal).

A Query Table part shall not have implicit or explicit relationships to any other part defined by this Standard.