Back to Devexpress

IXlSheet.AutoFilterRange Property

corelibraries-devexpress-dot-export-dot-xl-dot-ixlsheet-bf440dcd.md

latest2.1 KB
Original Source

IXlSheet.AutoFilterRange Property

Gets or sets the cell range for which filtering is enabled.

Namespace : DevExpress.Export.Xl

Assembly : DevExpress.Printing.v25.2.Core.dll

NuGet Package : DevExpress.Printing.Core

Declaration

csharp
XlCellRange AutoFilterRange { get; set; }
vb
Property AutoFilterRange As XlCellRange

Property Value

TypeDescription
XlCellRange

An XlCellRange object specifying a cell range for which the AutoFilter functionality is enabled.

|

Remarks

Use the AutoFilterRange property to enable a filtering functionality for the specified cell range.

Note

A complete sample project is available at https://github.com/DevExpress-Examples/excel-export-api-examples

csharp
// Enable filtering for the data range.
sheet.AutoFilterRange = sheet.DataRange;
vb
' Enable filtering for the data range.
sheet.AutoFilterRange = sheet.DataRange

Once filtering is activated, a drop-down arrow appears on the right side of each column header, as shown in the image below (the workbook is opened in Microsoft® Excel®). Users can click the arrow of the required column and select the filter type they wish to apply.

See Also

IXlSheet Interface

IXlSheet Members

DevExpress.Export.Xl Namespace