Table of Contents

XlsFile.SetAutoFilter Method

Sets the AutoFilter in the Active sheet to point to the range specified. Note: You will normally want to use ExcelFile.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.XlsAdapter

public override 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.

See also