Charu

Charu

  • NA
  • 128
  • 7.5k

Excel Auto filter error or not working from c# code

Feb 16 2017 4:43 AM
Hello All , i'm facing a problem to load the filtered data from excel . 
my problem is , filtering the year from excel filters using c# code . i have tried all the possible ways , but yet i didnot get any result, i hope here anybody will solve my issue .
i want to filter a column only by year , but it contains date/mm/year. please check the below code for your understanding .
when i give the input like 1/1/2016 , it will work , but when i entered only year , it will not work . please let me know where i'm failing . 
 
 range.AutoFilter (29, "2016",XlAutoFilterOperator.xlFilterValues,"2016",true);
range.AutoFilter(29, "*2/2016", XlAutoFilterOperator.xlFilterValues, "*2016", true); 

Answers (2)