2.2.4.14 AutoFilterOptions

Namespace: http://schemas.microsoft.com/office/Excel/Server/WebServices/ExcelServerInternalService/

Used to specify the filter applied to an AutoFilter column (2).

 <xs:complexType name="AutoFilterOptions" xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:sequence>
     <xs:element minOccurs="0" maxOccurs="1" name="AutoFilterType" type="xs:string"/>
     <xs:element minOccurs="0" maxOccurs="1" name="Criteria" type="tns:ArrayOfAutoFilterCriteria"/>
     <xs:element minOccurs="1" maxOccurs="1" name="CriteriaType" type="tns:AutoFilterCriteriaType"/>
     <xs:element minOccurs="1" maxOccurs="1" name="Id" type="xs:unsignedInt"/>
     <xs:element minOccurs="0" maxOccurs="1" name="SheetName" type="xs:string"/>
     <xs:element minOccurs="1" maxOccurs="1" name="Column" type="xs:int"/>
     <xs:element minOccurs="1" maxOccurs="1" name="NamedObjectView" type="xs:boolean"/>
   </xs:sequence>
 </xs:complexType>

AutoFilterType: The object on which the filter operates. MUST be either "Sheet" or "Table".

Criteria: The list of AutoFilterCriteria complex types (section 2.2.4.12) that specify how values are filtered. If the CriteriaType element contains a value different from Nil, then this element MUST NOT be present. If Criteria contains two AutoFilterCriteria elements, they MUST be one of the following:

  • The Type and Relation elements of the first AutoFilterCriteria MUST be GTEQ and And respectively. The Type and Relation elements of the second AutoFilterCriteria MUST be LTEQ and Nil respectively.

  • The Type and Relation elements of the first AutoFilterCriteria MUST be LT and Or respectively. The Type and Relation elements of the second AutoFilterCriteria MUST be GT and Nil respectively.

CriteriaType: The type of filter to apply as specified in section 2.2.5.1.

Id: The identifier of the table that has the filter applied to it. If the AutoFilterType element contains the string "Sheet" then this element MUST be ignored. If the AutoFilterType element contains the string "Table", then this element MUST contain a value that was previously returned from the protocol server in the ID attribute of CT_autofilter complex type, as specified in [MS-EXSPXML3] section 2.3.19.

SheetName: The name of the worksheet or named object containing the AutoFilter. MUST be present. MUST NOT be empty. If the NamedObjectView element is set to true, the following apply:

  • The value in the SheetName element is a named object on the workbook.

  • The length of SheetName MUST NOT be longer than 287 characters.

If the NamedObjectView element is set to false, the following apply:

  • The value in the SheetName element is a worksheet on the workbook.

  • The length of SheetName MUST NOT be longer than 31 characters.

Column: Specifies the one-based index of the column of the AutoFilter. If the AutoFilterType element contains the value "Table" then this value MUST be greater than or equal to 1 and less than or equal to the number of column in the Table containing the AutoFilter. If the AutoFilterType element contains the value "Sheet" then this value MUST be greater than or equal to 1 and less than or equal to the last numeric index of the column on the worksheet that contains an AutoFilter.

NamedObjectView: Specifies whether this filter is to be applied to an AutoFilter that is located on a worksheet or on a named object. MUST be set to true if AutoFilter is located on a named object; MUST be false otherwise.