2.4.7 AutoFilter12

The AutoFilter12 record specifies AutoFilter properties.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

frtRefHeader

...

...

iEntry

fHideArrow

...

ft

...

cft

...

cCriteria

...

cDateGroupings

...

A

B

unused1

unused2

idList

guidSview (16 bytes)

...

...

rgb (variable)

...

rgCriteria (variable)

...

rgDateGroupings (variable)

...

frtRefHeader (12 bytes): An FrtRefHeader structure (section 2.5.137). The frtRefHeader.rt MUST be 0x087E. frtRefHeader.grbitFrt.fFrtRef MUST be 0x1. The frtRefHeader.ref8 field MUST refer to the range of cells associated with this record.

iEntry (2 bytes): An unsigned integer that specifies the sheet (1) column that this AutoFilter applies to. The column index is determined by the following formula:

frtRefHeader.ref8.colFirst + iEntry.

The value of iEntry MUST be less than or equal to 255.

fHideArrow (4 bytes): A Boolean (section 2.5.14) that specifies whether the user interface used to display AutoFilter settings is hidden.

ft (4 bytes): An unsigned integer that specifies the filter type. MUST be one of the values in the table specified in rgb.

cft (4 bytes): An unsigned integer that specifies the custom filter type. MUST be one of the values in the following table:

Value

Meaning

0x00000000

No custom filter

0x00000001

The custom filter displays items that are above average.

0x00000002

The custom filter displays items that are below average.

0x00000008

The custom filter displays items that are from tomorrow.

0x00000009

The custom filter displays items that are from today.

0x0000000A

The custom filter displays items that are from yesterday.

0x0000000B

The custom filter displays items that are from next week.

0x0000000C

The custom filter displays items that are from this week.

0x0000000D

The custom filter displays items that are from last week

0x0000000E

The custom filter displays items that are from next month.

0x0000000F

The custom filter displays items that are from this month.

0x00000010

The custom filter displays items that are from last month.

0x00000011

The custom filter displays items that are from next quarter.

0x00000012

The custom filter displays items that are from this quarter.

0x00000013

The custom filter displays items that are from last quarter.

0x00000014

The custom filter displays items that are from next year.

0x00000015

The custom filter displays items that are from this year.

0x00000016

The custom filter displays items that are from last year.

0x00000017

The custom filter displays items that are from year-to-date.

0x00000018

The custom filter displays items that are from the 1st quarter.

0x00000019

The custom filter displays items that are from the 2nd quarter.

0x0000001A

The custom filter displays items that are from the 3rd quarter.

0x0000001B

The custom filter displays items that are from the 4th quarter.

0x0000001C

The custom filter displays items that are from the 1st month.

0x0000001D

The custom filter displays items that are from the 2nd month.

0x0000001E

The custom filter displays items that are from the 3rd month.

0x0000001F

The custom filter displays items that are from the 4th month.

0x00000020

The custom filter displays items that are from the 5th month.

0x00000021

The custom filter displays items that are from the 6th month.

0x00000022

The custom filter displays items that are from the 7th month.

0x00000023

The custom filter displays items that are from the 8th month.

0x00000024

The custom filter displays items that are from the 9th month.

0x00000025

The custom filter displays items that are from the 10th month.

0x00000026

The custom filter displays items that are from the 11th month.

0x00000027

The custom filter displays items that are from the 12th month.

cCriteria (4 bytes): An unsigned integer that specifies the number of items in rgCriteria. MUST be ignored if ft is nonzero.

cDateGroupings (4 bytes): An unsigned integer that specifies the number of items in rgDateGroupings. MUST be ignored if ft is nonzero.

A - reserved1 (3 bits): MUST be zero, and MUST be ignored.

B - fWorksheetAutoFilter (1 bit): A bit that specifies whether this filter is a sheet (1) AutoFilter. A sheet (1) AutoFilter filters items in the sheet specified by the Worksheet part (section 2.1.7.20.5) that contains this record. MUST be 1 if and only if idList is equal to 0xFFFFFFFF.

unused1 (12 bits): Undefined and MUST be ignored.

unused2 (4 bytes): Undefined and MUST be ignored.

idList (4 bytes): An unsigned integer that specifies the table with items that are filtered by this AutoFilter. MUST either be equal to the idList field of the associated TableFeatureType structure (section 2.5.266) or MUST be 0xFFFFFFFF if this filter is a sheet (1) AutoFilter.

guidSview (16 bytes): A GUID as specified by [MS-DTYP] that specifies the associated UserSViewBegin record (section 2.4.334). MUST be 0, or MUST be equal to the guid field of the preceding UserSViewBegin record (section 2.4.334).

rgb (variable): A variable type field whose type and meaning is specified by the value of ft, as defined in the following table:

Value of ft

Type of rgb

0x00000000

rgb does not exist. Either cCriteria or cDateGroupings MUST be greater than zero.

0x00000001

rgb is a DXFN12NoCB structure (section 2.5.98) that specifies the cell color to use for the filter.

0x00000002

rgb is a DXFN12NoCB structure (section 2.5.98) that specifies the cell font to use for the filter.

0x00000003

rgb is an AF12CellIcon structure (section 2.5.2) that specifies the cell icon to use for the filter.

rgCriteria (variable): An optional array of AF12Criteria structures (section 2.5.3). The length of the array MUST be equal to cCriteria. MUST exist if and only if ft is zero and cCriteria is nonzero. Each element of the array MUST be specified in a separate ContinueFrt12 record (section 2.4.62).

rgDateGroupings (variable): An optional array of AF12DateInfo structures (section 2.5.4). The length of the array MUST be equal to cDateGroupings. MUST exist if and only if ft is zero and cDateGroupings is nonzero. Each element of the array MUST be specified in a separate ContinueFrt12 record (section 2.4.62).