We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to clear autofilters

Thread ID:





84407 Jun 30,2009 04:24 PM UTC Jul 2,2009 06:21 AM UTC WinForms 3
Tags: XlsIO
Wout de Zeeuw
Asked On June 30, 2009 04:24 PM UTC


I'm trying to clear autofilters, but can't figure out how to do it. Is there any example code somewhere? IWorksheet.AutoFilters.FilterRange seems to be close, but how to set it to an empty range? I can't set it to null.



Geetha M [Syncfusion]
Replied On July 1, 2009 11:48 AM UTC

Hi Wout,

Thank you for your continued interest in Syncfusion products.

Currently it is not possible to clear filters. But you can workaround this by changing the current FilterRange. You can check the code snippet below.

sheet.AutoFilters.FilterRange = sheet[30,20];

Please try this and let me know if you have any questions.


Wout de Zeeuw
Replied On July 1, 2009 03:36 PM UTC


I tried this workaround, which works ok luckily:

CType(newWorkSheet.AutoFilters, Syncfusion.XlsIO.Implementation.Collections.AutoFiltersCollection).Clear()

If the AutoFilters (IAutoFilters) interface could expose the Clear() method, then the ugly cast wouldn't be needed.

Best regards,


Geetha M [Syncfusion]
Replied On July 2, 2009 06:21 AM UTC

Hi Wout,

Thank you for the details.

I have logged a feature request on this regard and will get back to you once it is implemented.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon