<?xml version="1.0" encoding="utf-8"?>
<xsd:schema targetNamespace="http://schemas.openxmlformats.org/spreadsheetml/2006/main" elementFormDefault="qualified" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:include schemaLocation="sml-baseTypes.xsd" />
  <xsd:include schemaLocation="sml-styles.xsd" />
  <xsd:include schemaLocation="sml-autoFilter.xsd" />
  <xsd:element name="queryTable" type="CT_QueryTable">
    <xsd:annotation>
      <xsd:documentation>Query Table</xsd:documentation>
    </xsd:annotation>
  </xsd:element>
  <xsd:complexType name="CT_QueryTable">
    <xsd:sequence>
      <xsd:element name="queryTableRefresh" type="CT_QueryTableRefresh" minOccurs="0" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>QueryTable Refresh Information</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="extLst" type="CT_ExtensionList" minOccurs="0" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>Future Feature Data Storage Area</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
    <xsd:attribute name="name" type="ST_Xstring" use="required">
      <xsd:annotation>
        <xsd:documentation>QueryTable Name</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="headers" type="xsd:boolean" use="optional" default="true">
      <xsd:annotation>
        <xsd:documentation>First Row Column Titles</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="rowNumbers" type="xsd:boolean" use="optional" default="false">
      <xsd:annotation>
        <xsd:documentation>Row Numbers</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="disableRefresh" type="xsd:boolean" use="optional" default="false">
      <xsd:annotation>
        <xsd:documentation>Disable Refresh</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="backgroundRefresh" type="xsd:boolean" use="optional" default="true">
      <xsd:annotation>
        <xsd:documentation>Background Refresh</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="firstBackgroundRefresh" type="xsd:boolean" use="optional" default="false">
      <xsd:annotation>
        <xsd:documentation>First Background Refresh</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="refreshOnLoad" type="xsd:boolean" use="optional" default="false">
      <xsd:annotation>
        <xsd:documentation>Refresh On Load</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="growShrinkType" type="ST_GrowShrinkType" use="optional" default="insertDelete">
      <xsd:annotation>
        <xsd:documentation>Grow Shrink Type</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="fillFormulas" type="xsd:boolean" use="optional" default="false">
      <xsd:annotation>
        <xsd:documentation>Fill Adjacent Formulas</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="removeDataOnSave" type="xsd:boolean" use="optional" default="false">
      <xsd:annotation>
        <xsd:documentation>Remove Data On Save</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="disableEdit" type="xsd:boolean" use="optional" default="false">
      <xsd:annotation>
        <xsd:documentation>Disable Edit</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="preserveFormatting" type="xsd:boolean" use="optional" default="true">
      <xsd:annotation>
        <xsd:documentation>Preserve Formatting On Refresh</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="adjustColumnWidth" type="xsd:boolean" use="optional" default="true">
      <xsd:annotation>
        <xsd:documentation>Adjust Column Width On Refresh</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="intermediate" type="xsd:boolean" use="optional" default="false">
      <xsd:annotation>
        <xsd:documentation>Intermediate</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="connectionId" type="xsd:unsignedInt" use="required">
      <xsd:annotation>
        <xsd:documentation>Connection Id</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attributeGroup ref="AG_AutoFormat" />
  </xsd:complexType>
  <xsd:complexType name="CT_QueryTableRefresh">
    <xsd:sequence>
      <xsd:element name="queryTableFields" type="CT_QueryTableFields" minOccurs="1" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>Query table fields</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="queryTableDeletedFields" type="CT_QueryTableDeletedFields" minOccurs="0" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>Deleted Fields</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="sortState" minOccurs="0" maxOccurs="1" type="CT_SortState">
        <xsd:annotation>
          <xsd:documentation>Sort State</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="extLst" minOccurs="0" maxOccurs="1" type="CT_ExtensionList">
        <xsd:annotation>
          <xsd:documentation>Future Feature Data Storage Area</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
    <xsd:attribute name="preserveSortFilterLayout" type="xsd:boolean" use="optional" default="true">
      <xsd:annotation>
        <xsd:documentation>Preserve Sort &amp; Filter Layout</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="fieldIdWrapped" type="xsd:boolean" use="optional" default="false">
      <xsd:annotation>
        <xsd:documentation>Next Field Id Wrapped</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="headersInLastRefresh" type="xsd:boolean" use="optional" default="true">
      <xsd:annotation>
        <xsd:documentation>Headers In Last Refresh</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="minimumVersion" type="xsd:unsignedByte" use="optional" default="0">
      <xsd:annotation>
        <xsd:documentation>Minimum Refresh Version</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="nextId" type="xsd:unsignedInt" use="optional" default="1">
      <xsd:annotation>
        <xsd:documentation>Next field id</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="unboundColumnsLeft" type="xsd:unsignedInt" use="optional" default="0">
      <xsd:annotation>
        <xsd:documentation>Columns Left</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="unboundColumnsRight" type="xsd:unsignedInt" use="optional" default="0">
      <xsd:annotation>
        <xsd:documentation>Columns Right</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
  </xsd:complexType>
  <xsd:complexType name="CT_QueryTableDeletedFields">
    <xsd:sequence>
      <xsd:element name="deletedField" type="CT_DeletedField" minOccurs="1" maxOccurs="unbounded">
        <xsd:annotation>
          <xsd:documentation>Deleted Field</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
    <xsd:attribute name="count" type="xsd:unsignedInt" use="optional">
      <xsd:annotation>
        <xsd:documentation>Deleted Fields Count</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
  </xsd:complexType>
  <xsd:complexType name="CT_DeletedField">
    <xsd:attribute name="name" type="ST_Xstring" use="required">
      <xsd:annotation>
        <xsd:documentation>Deleted Fields Name</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
  </xsd:complexType>
  <xsd:complexType name="CT_QueryTableFields">
    <xsd:sequence>
      <xsd:element name="queryTableField" type="CT_QueryTableField" minOccurs="0" maxOccurs="unbounded">
        <xsd:annotation>
          <xsd:documentation>QueryTable Field</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
    <xsd:attribute name="count" type="xsd:unsignedInt" use="optional" default="0">
      <xsd:annotation>
        <xsd:documentation>Column Count</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
  </xsd:complexType>
  <xsd:complexType name="CT_QueryTableField">
    <xsd:sequence minOccurs="0">
      <xsd:element name="extLst" type="CT_ExtensionList" minOccurs="0" maxOccurs="1">
        <xsd:annotation>
          <xsd:documentation>Future Feature Data Storage Area</xsd:documentation>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
    <xsd:attribute name="id" type="xsd:unsignedInt" use="required">
      <xsd:annotation>
        <xsd:documentation>Field Id</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="name" type="ST_Xstring" use="optional">
      <xsd:annotation>
        <xsd:documentation>Name</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="dataBound" type="xsd:boolean" use="optional" default="true">
      <xsd:annotation>
        <xsd:documentation>Data Bound Column</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="rowNumbers" type="xsd:boolean" use="optional" default="false">
      <xsd:annotation>
        <xsd:documentation>Row Numbers</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="fillFormulas" type="xsd:boolean" use="optional" default="false">
      <xsd:annotation>
        <xsd:documentation>Fill This Formula On Refresh</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="clipped" type="xsd:boolean" use="optional" default="false">
      <xsd:annotation>
        <xsd:documentation>Clipped Column</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="tableColumnId" type="xsd:unsignedInt" default="0">
      <xsd:annotation>
        <xsd:documentation>Table Column Id</xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
  </xsd:complexType>
  <xsd:simpleType name="ST_GrowShrinkType">
    <xsd:annotation>
      <xsd:documentation>Grow Shrink Type</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="insertDelete">
        <xsd:annotation>
          <xsd:documentation>Insert &amp; Delete On Refresh</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration value="insertClear">
        <xsd:annotation>
          <xsd:documentation>Insert &amp; Clear On Refresh</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration value="overwriteClear">
        <xsd:annotation>
          <xsd:documentation>Overwrite &amp; Clear On Refresh</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
    </xsd:restriction>
  </xsd:simpleType>
</xsd:schema>