# CommandType element (PTQuerySourceType complexType)

Specifies the type of command used in the CommandText element.

## Usage

    <CommandType />

## Element Information

Element type | Anonymous
Namespace | urn:schemas-microsoft-com:office:excel
Schema name | XML Spreadsheet 2000

## Elements and Attributes

### Parent Elements

Element | Description
--- | ---
QuerySource | Describes the data source that the PivotTable view is based on when the PivotTable view is created from an external source.

### Child Elements

None.

### Attributes

None.

## Definition

    <xsd:element name="CommandType" default="None" minOccurs="0" >
      <xsd:simpleType>
        <xsd:restriction base="xsd:string">
          <xsd:enumeration value="Cube" />
          <xsd:enumeration value="Default" />
          <xsd:enumeration value="None" />
          <xsd:enumeration value="SQL" />
          <xsd:enumeration value="Table" />
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:element>

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp