ExcelFile.SetAutoFilter Method
Overloads
- ExcelFile.SetAutoFilter(TXlsCellRange)
- ExcelFile.SetAutoFilter(TXlsCellRange, Boolean)
- ExcelFile.SetAutoFilter(Int32, Int32, Int32)
- ExcelFile.SetAutoFilter(Int32, Int32, Int32, Int32)
ExcelFile.SetAutoFilter(TXlsCellRange)
Important
This Method is obsolete.
Use SetAutoFilter(TXlsCellRange, false) instead.
OBSOLETE: Use SetAutoFilter(TXlsCellRange, Boolean) instead. Sets an AutoFilter in a cell range, ignoring the bottom coordinate of the range. Ignoring the bottom coordinate is almost always what you will want to do, but it is better to be explicit if you want to ignore it. So this method was deprecated, and you should call SetAutofilter(range, false) instead. Doing a search and replace from SetAutofilter(range) to SetAutofilter(range, false) in your code will keep your code working exactly as it worked before.
Syntax
Namespace: FlexCel.Core
public void SetAutoFilter(TXlsCellRange range)
Parameters
<-> | Parameter | Type | Description |
---|---|---|---|
range | TXlsCellRange | Range to set the AutoFilter. If range is null, this method does nothing. |
See also
ExcelFile.SetAutoFilter(TXlsCellRange, Boolean)
Sets an AutoFilter in a cell range.
Syntax
Namespace: FlexCel.Core
public void SetAutoFilter(TXlsCellRange range, Boolean useBottomCoordinate)
Parameters
<-> | Parameter | Type | Description |
---|---|---|---|
range | TXlsCellRange | Range to set the AutoFilter. If range is null, this method does nothing. | |
useBottomCoordinate | Boolean | If false the bottom coordinate of the range will be ignored, and the range will extend until the first non-empty row. This is the normal way you set autofilters in Excel. When true, the range will go at least up to range.Bottom, no matter the actual used cells in Excel. To set an autofiter this way in Excel, you would select a range, then set the autofilter over that range. Note that the autofilter can include rows after range.Bottom anyway. range.Bottom only specifies the minimum row that must be included. |
See also
ExcelFile.SetAutoFilter(Int32, Int32, Int32)
Sets the AutoFilter in the Active sheet to point to the range specified. This is the most common ways to specify autofilters, where the rows in the filter will expand to the first non-empty row. In the not-common case where you want to specify a full range for the autofilter, you can use SetAutoFilter(Int32, Int32, Int32, Int32)
Syntax
Namespace: FlexCel.Core
public void SetAutoFilter(Int32 row, Int32 col1, Int32 col2)
Parameters
<-> | Parameter | Type | Description |
---|---|---|---|
row | Int32 | Row where the AutoFilter will be placed (1 based). | |
col1 | Int32 | First column for the AutoFilter range (1 based). | |
col2 | Int32 | Last column for the AutoFilter range (1 based). |
See also
ExcelFile.SetAutoFilter(Int32, Int32, Int32, Int32)
Sets the AutoFilter in the Active sheet to point to the range specified. Note: You will normally want to use SetAutoFilter(Int32, Int32, Int32), since that is the common way to set autofilters. The last row shouldn't matter, so it will addapt automatically when you add rows. If you specify the last row, then the range will still grow to include all data, but it will include at least the last row you specify, even if it is blank."/>
Syntax
Namespace: FlexCel.Core
public abstract void SetAutoFilter(Int32 row1, Int32 col1, Int32 row2, Int32 col2)
Parameters
<-> | Parameter | Type | Description |
---|---|---|---|
row1 | Int32 | Row where the AutoFilter will be placed (1 based). | |
col1 | Int32 | First column for the AutoFilter range (1 based). | |
row2 | Int32 | Last row for the autofilter (1 based). | |
col2 | Int32 | Last column for the AutoFilter range (1 based). Note that the autofilter will automatically expand over this row if you have more non-empty rows below this row. |