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. Image for the cookie policy date

Pivot table filter

Hello,

I have an Excel file that I update with new data. The source file has sheets with differents pivot table.

These pivot table are refreshed (pivotTableImpl.Cache.IsRefreshOnLoad = true;). But I want to change filters (for example, put the current month or year).

I don't understand how I can do this. I tried a few solutions without success.


Thanks,

Eric


8 Replies

KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team October 20, 2022 06:50 AM

Hi Eric,

Greetings from Syncfusion.

We are checking the reported query and will get back to you with details tomorrow (October 21st, 2022).

Regards,
Keerthi.


KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team October 21, 2022 11:48 AM

Hi Eric,


We regret for the inconvenience.


We will share you the details in one business day (on October 26th, 2022), without further delay.


Regards,

Keerthi.



KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team October 26, 2022 07:04 AM

Hi Eric,


We appreciate your patience.


As of now, Syncfusion XlsIO do have support only for creating auto filters in pivot table, but not for modifying or removing the auto filters. We are checking the feasibility to implement that and will get back to you with details on October 28th, 2022.


Regards,

Keerthi.



KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team October 28, 2022 09:19 AM

Hi Eric,


We appreciate your patience.


We have analyzed that it is not possible to modify the existing pivot filters. But the existing filters can be removed from pivot fields and new filters can be added/created.


We have logged a feature report to provide support for removing the existing pivot filters from pivot fields and will include the implementation in our weekly NuGet release scheduled for November 15th, 2022. You can track the status of feature report through following feedback link.


Track Status: https://www.syncfusion.com/feedback/38736/support-for-removing-pivot-filter-from-pivot-field


Regards,

Keerthi.



ER Eric October 31, 2022 06:49 AM

Hello Keerthi ,


Sorry for the late response. I will test your solution asap.


Best regards,

Eric



KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team November 1, 2022 12:13 AM

Hi Eric,


We have logged the feature and shared that information in our previous update, but did not provide any suggestions yet.


Regards,

Keerthi.



WI will November 15, 2022 12:28 AM

Click anywhere in the PivotTable to show the PivotTable tabs on the ribbon. On the PivotTable Analyze tab, click Options. In the PivotTable Options dialog box, click the Totals & Filters tab. In the Filters area, check or uncheck the Allow multiple filters per field box depending on what you need.


Regards,

Will



KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team November 22, 2022 07:00 AM

Sorry for the delay, Eric.


We have included support for removing the existing pivot filters from pivot fields in our weekly NuGet release version 20.3.0.58. Kindly upgrade to this latest version and let us know if the issue is resolved.


Latest NuGet Package: https://www.nuget.org/packages/Syncfusion.XlsIO.WinForms/20.3.0.58


And, please use the below code snippet to remove existing pivot filters from the pivot field.


IPivotTable pivotTable = worksheet.PivotTables[0];

IPivotField pivotField = pivotTable.Fields[3];

 

// Remove the filters from pivot field of a pivot table.

pivotField.PivotFilters.Remove();



Loader.
Live Chat Icon For mobile
Up arrow icon