# WorksheetType complexType

Defines a worksheet within the current workbook. An document must contain at least one instance of this element to be a valid XML Spreadsheet document.

## Type Information

Namespace | urn:schemas-microsoft-com:office:spreadsheet
Schema name | XML Spreadsheet 2002

## Elements and Attributes

### Child Elements

Element | Description
--- | ---
Names | Defines a collection of named ranges within a workbook or worksheet.
Table | Defines the table to contain the cells of the current worksheet. Only one instance of a Table element is valid for a single worksheet.
x:WorksheetOptions | See external namespace.
x:Watches | See external namespace.
x:DataTable | See external namespace.
x:PageBreaks | See external namespace.
x:PivotTable | See external namespace.
x:DataValidation | See external namespace.
x:AutoFilter | See external namespace.
x:ConditionalFormatting | See external namespace.
x:Sorting | See external namespace.
c:worksheetoptions | See external namespace.
x:QueryTable | See external namespace.

### Attributes

Attribute | Type | Required | Description | Possible Values
--- | --- | --- | --- | ---
Name | xsd:string | required | Specifies the name of a worksheet. This value must be unique within the list of worksheet names of a given workbook. | See external namespace.
Protected | TrueFalseType | optional | Specifies whether a worksheet is protected. When protection is not enabled for a worksheet, protection settings for individual cells have no effect. | 0 1
RightToLeft | TrueFalseType | optional | Specifies whether the worksheet window displays information from left to right or from right to left. If this attribute is set to display from right to left, column A in a worksheet is the first column on the right. | 0 1

## Definition

    <xsd:complexType name="WorksheetType" >
      <xsd:sequence>
        <xsd:element name="Names" type="NamesType" minOccurs="0">
        </xsd:element>
        <xsd:element name="Table" type="TableType" minOccurs="0">
        </xsd:element>
        <xsd:element ref="x:WorksheetOptions" minOccurs="0" />
        <xsd:element ref="x:Watches" minOccurs="0" />
        <xsd:element ref="x:DataTable" minOccurs="0" />
        <xsd:element ref="x:PageBreaks" minOccurs="0" />
        <xsd:element ref="x:PivotTable" minOccurs="0" maxOccurs="unbounded" />
        <xsd:element ref="x:DataValidation" minOccurs="0" maxOccurs="unbounded" />
        <xsd:element ref="x:AutoFilter" minOccurs="0" />
        <xsd:element ref="x:ConditionalFormatting" minOccurs="0" maxOccurs="unbounded" />
        <xsd:element ref="x:Sorting" minOccurs="0" />
        <xsd:element ref="c:worksheetoptions" minOccurs="0" />
        <xsd:element ref="x:QueryTable" minOccurs="0" maxOccurs="unbounded" />
      </xsd:sequence>
      <xsd:attribute form="qualified" name="Name" type="xsd:string" use="required">
      </xsd:attribute>
      <xsd:attribute form="qualified" name="Protected" type="TrueFalseType" use="optional" default="0">
      </xsd:attribute>
      <xsd:attribute form="qualified" name="RightToLeft" type="TrueFalseType" use="optional" default="0">
      </xsd:attribute>
    </xsd:complexType>

©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