Smiler
Smiler
CC#
Created by Smiler on 7/4/2023 in #help
❔ 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);
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.
4 replies