C#C
C#3y ago
Smiler

❔ Excel column filter

Using VSTO/interop
I'm trying to filter an excel sheet based on a column containing integer IDs. My plugin collects an array of integers and then tries to filter the column:
            vstoSheet.Range["A1:A10"].AutoFilter(1, new int[]{1,2,3}, Excel.XlAutoFilterOperator.xlFilterValues, System.Type.Missing, true);

I've tried to reason about why it doesn't work but every possible combination of options I could think of just resulted in all elements being filtered. The expected behaviour is to only have the elements in the provided list being displayed.
Was this page helpful?