Reputation: 575
I am using Microsoft Interop to read the data.
In excel-sheet, multiple random columns have "filters" set. How do I find out which cells /columns have filters set? I would like lo load only the columns that have filters set.
here is how the sheet looks like
row 1-5, col 1-10 [long text describes the data in the sheet, i do not want to load ]
row 1-10, col 1 [some data, not filtered, i do not want to load]
row 1-10, col 2-15 [filter set for some columns only, i would like to detect the filters and load the entire column data ]
Upvotes: 4
Views: 5656
Reputation: 43056
Worksheet
interface has an AutoFilter
property that returns an AutoFilter
interface.AutoFilter
interface has a Filters
property that returns a Filters
interface.AutoFilter
interface has a Range
property that returns the range being filtered.Filters
interface is a collection of Filter
s; these are in the same order as the columns in AutoFilter.Range
Filter
interface has an On
property that indicates whether the column is being filtered.Upvotes: 2