none
find special value in column in excel in c# RRS feed

  • Question

  • Hi, I have an excel file and I want to open it using windows form application and choose special rows of it if column i dose not have the value 1. I know that   the below code can find all members that the value of column 16 is 9710. now, if I want members that the value of column 16 is not 9710, how should I write this?

    SourceWorksheet.Columns.AutoFilter(16, "9710"); 

    Monday, December 25, 2017 1:37 PM

Answers

  • Hello nadianaji,

    Please try to refer to below code.

    SourceWorksheet.Columns.AutoFilter(16, "<>9710"); 

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Proposed as answer by Terry Xu - MSFT Tuesday, December 26, 2017 1:36 AM
    • Marked as answer by nadianaji Tuesday, December 26, 2017 6:34 AM
    Tuesday, December 26, 2017 1:23 AM

All replies

  • Hello nadianaji,

    Please try to refer to below code.

    SourceWorksheet.Columns.AutoFilter(16, "<>9710"); 

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Proposed as answer by Terry Xu - MSFT Tuesday, December 26, 2017 1:36 AM
    • Marked as answer by nadianaji Tuesday, December 26, 2017 6:34 AM
    Tuesday, December 26, 2017 1:23 AM
  • thank you very much. 
    Tuesday, December 26, 2017 6:34 AM