Working with Pivot Filters – Aspose.Cells Cloud Documentation
Contents
[
Hide
]
This REST API adds a pivot filter to the pivot table at the specified index.
Prerequisites
Before calling this endpoint you must:
- Generate a valid OAuth/JWT access token and include it in the
Authorizationheader. - Ensure the target workbook is stored in a cloud folder that you have access to (specify
folderand optionallystorageName). - Use Aspose.Cells Cloud API version 3.0 or later.
REST API
PUT https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/pivottables/{pivotTableIndex}/PivotFilters
Request parameters
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| name | string | path | The name of the Excel file. |
| sheetName | string | path | The worksheet that contains the pivot table. |
| pivotTableIndex | integer | path | Zero‑based index of the pivot table to which the filter will be applied. |
| filter | object | body | JSON object that defines the filter settings (e.g., AutoFilter, EvaluationOrder, etc.). |
| needReCalculate | boolean | query | When true, forces the workbook to recalculate after the filter is added. Default false. |
| folder | string | query | Folder in cloud storage where the file is located. |
| storageName | string | query | Name of the cloud storage. |
Note: All parameters listed above are required unless explicitly marked as optional in the API reference.
Response codes
| Code | Meaning |
|---|---|
| 200 | Filter added successfully. |
| 400 | Bad request – invalid parameters. |
| 401 | Unauthorized – missing or invalid token. |
| 404 | Not found – workbook or pivot table missing. |
| 500 | Internal server error. |
Best Practices
- Keep filter objects as small as possible; large filter definitions may increase request latency.
- Calls are idempotent – adding the same filter twice will not create duplicates.
- Respect the API rate‑limit of 100 requests per minute per account.
You can explore the full OpenAPI definition here:
OpenAPI Specification
Example cURL request
Cloud SDK Family
Using an SDK is the fastest way to develop against Aspose.Cells Cloud. SDKs handle low‑level details, letting you focus on your business logic. See the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.
The following code examples demonstrate how to make calls to Aspose.Cells web services using various SDKs.
For additional operations related to pivot tables, see the Add, Delete, and Clear filter documentation.