Add Filter in Pivot Table

Possible Usage Scenarios

When you create a pivot table with known data and want to filter it, you need to learn and use a filter. It can help you filter out the data you want effectively. By using the Aspose.Cells for Node.js via C++ API, you can add a filter on field values in pivot tables.

Add Filter in Pivot Table Using Aspose.Cells for Node.js via C++

Please see the following sample code. It sets the data and creates a PivotTable based on it. Then it adds a filter on the row field of the pivot table. Finally, it saves the workbook in output XLSX format. After executing the example code, a pivot table with a Top 10 filter is added to the worksheet.

Sample Code