2.2.4.10 AutoFilterOptions

AutoFilterOptions is used to specify the filter applied to an AutoFilter column (2).

This complex type is defined as follows.

 <s:complexType name="AutoFilterOptions">
   <s:sequence>
     <s:element name="AutoFilterType" type="s:string" minOccurs="0"/>
     <s:element name="Criteria" type="tns:ArrayOfAutoFilterCriteria" minOccurs="0"/>
     <s:element name="CriteriaType" type="tns:AutoFilterCriteriaType"/>
     <s:element name="Id" type="s:unsignedInt"/>
     <s:element name="SheetName" type="s:string" minOccurs="0"/>
     <s:element name="Column" type="s:int"/>
     <s:element name="NamedObjectView" type="s:boolean"/>
   </s:sequence>
 </s:complexType>

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

Criteria: The list of AutoFilterCriteria complex types (section 2.2.4.8) that specify how values are filtered. If the CriteriaType element contains a value other than "Nil", 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 filtering 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 by the protocol server. 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 the AutoFilter element (section 2.2.4.24.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 greater than 31 characters.

Column: Specifies the one-based index of the column (2) 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 (2) 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 (2) on the worksheet that contains an AutoFilter.

NamedObjectView: Specifies whether this filter is to be applied to an AutoFilter which 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.