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.
Unfortunately, activation email could not send to your email. Please try again.

Usage of the Excel column filter feature in XlsIO ExcelEngine

Thread ID:

Created:

Updated:

Platform:

Replies:

118272 Feb 18,2015 09:08 AM Feb 25,2015 01:01 AM ASP.NET Web Forms 5
loading
Tags: XlsIO
cubido
Asked On February 18, 2015 09:08 AM

Hi,

we are currently using the Syncfusion XlsIO ExcelEngine to generate our excel export files. Now we are interested in using the excel column filter feature for our purposes.
Here a screenshot of the feature:
 

Is there a way to do this with the Syncfusion XlsIO component?

Thanks in advance for your help.

Best regards,
Jochen


Dilli Babu Nandha Gopal [Syncfusion]
Replied On February 19, 2015 02:02 AM

Hi Cubido,

Thank you for using Syncfusion products.

XlsIO supports data filtering functionality. The detailed behavior of the autofilter is explained in following UG link.

UG documentation link:

http://help.syncfusion.com/ug/windows%20forms/default.htm#!documents/datafiltering.htm

We have also created a sample which illustrates the autofilter in XlsIO, which is available in the following KB links.

KB link:

1)      https://www.syncfusion.com/kb/1864/how-do-i-add-an-autofilter-to-my-spreadsheet

2)      https://www.syncfusion.com/kb/1939/how-do-i-create-an-autofilter-using-xlsio

Kindly refer to this and let us know if this helps.

Regards,

Dilli babu.



cubido
Replied On February 19, 2015 03:31 AM

Hi Dilli babu,

thanks for your fast reply. It's great to see that I can add this easily to our implementation.
I guess that it's not possible but is there a way to pre-select the filter values for these columns in my code?

Regards,
Jochen


Dilli Babu Nandha Gopal [Syncfusion]
Replied On February 20, 2015 03:15 AM

Hi Jochen,

Thank you for updating us.

Yes, you can pre-select the values of filtered column but there is a limitation in this. Where, you can select only two values as a condition. The below code snippet illustrates the pre-selecting filter values in Autofilters.

Code Snippet:

            sheet.AutoFilters.FilterRange = sheet.Range["A1:A10"];

            IAutoFilter filter = sheet.AutoFilters[0];

           

            filter.FirstCondition.DataType = ExcelFilterDataType.String;

            filter.FirstCondition.String = "test1";

            filter.IsAnd = false;

            filter.SecondCondition.DataType = ExcelFilterDataType.String;

            filter.SecondCondition.String = "test6";

We have shared a simple sample for your reference. Currently we don’t have a support for pre-selecting multiple values. We have logged a feature report for this and have no plans of implementing this now.

The sample can be downloaded from following link.

Sample Link: http://www.syncfusion.com/downloads/support/directtrac/118272/Autofilter-1717468444.zip

Please let us know if you have any concerns.

Regards,

Dilli babu.



cubido
Replied On February 24, 2015 04:09 AM

Hi Dilli babu,

thanks for the sample application.
Unfortunately these limitations make the pre-filtering not usable for us.
Nevertheless we can use the default autofilter now and that makes it possible to match the user expectations.

All the best,
Jochen


Dilli Babu Nandha Gopal [Syncfusion]
Replied On February 25, 2015 01:01 AM

Hi Jochen,

 

Thank you for updating us.

Please let us know if you require any further assistance on this.

 

Regards,

Dilli babu.



CONFIRMATION

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.

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.

;