Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
When you create a pivot table with known data and want to filter the pivot table, you need to learn how to use filters. It can help you effectively filter out the data you want. By using the Aspose.Cells Java API, you can add a filter on field values in Pivot Tables.
To add a filter in a Pivot Table in Excel, follow these steps:


Please see the following sample code. It sets the data and creates a PivotTable based on it. Then adds a filter on the row field of the pivot table. Finally, it saves the workbook in the output XLSX format. After executing the example code, a pivot table with a top‑10 filter is added to the worksheet.
Clear filter in Pivot Table in Excel, follow these steps:


Please see the following sample code. It sets the data and creates a PivotTable based on it. Then adds a filter on the row field of the pivot table. Finally, it saves the workbook in the output XLSX format. After executing the example code, a pivot table with a top‑10 filter is added to the worksheet. After adding a filter, when we need unfiltered data, we can clear the filter on a specific pivot field. After executing the code to clear the filter, the filter on the specific pivot field will be cleared. Please check the output XLSX.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.