Add a Filter to an Excel Worksheet using Aspose.Cells Cloud

Prerequisites: Before calling this API you must obtain a valid JWT token, ensure the target workbook is uploaded to the specified storage, and have the necessary permissions to access the file. A recent version of cURL (7.68 or later) is recommended for command‑line examples.

This REST API adds a filter for a specific column on an Excel worksheet.

PutWorksheetFilter API

PUT https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/autoFilter/filter

Security and Authentication

The Aspose.Cells Cloud APIs are secure and require JWT token-based authentication.

Request parameters

Parameter Name Type Location Description
name string Path The workbook name.
sheetName string Path The worksheet name.
range string Query The cell range that contains the filter (e.g., A1:B1).
fieldIndex integer Query Zero‑based index of the column to which the filter is applied.
criteria string Query The filter criteria (e.g., a value or expression).
matchBlanks boolean Query Set to true to include blank cells in the filter; otherwise false.
refresh boolean Query Set to true to refresh the filter after applying; otherwise false.
folder string Query The folder where the original workbook is stored.
storageName string Query The name of the storage service.

Response

{
    "Status":"OK",
    "Code":200
}

HTTP Status Codes

Code Meaning Description
200 OK Filter applied successfully; response contains operation details.
400 Bad Request Missing or invalid parameters (e.g., unsupported file type).
401 Unauthorized Invalid or missing JWT token.
413 Payload Too Large Uploaded file exceeds size limit.
500 Internal Server Error Unexpected server error.

How to Use the PutWorksheetFilter API with SDKs

PutWorksheetFilter API Specification

The OpenAPI Specification defines a publicly accessible programming interface and lets you perform REST interactions directly from a web browser.

You can use the cURL command‑line tool to access Aspose.Cells web services easily. The following example shows how to call the API with cURL.

Use Aspose.Cells Cloud SDKs

Using an SDK is the fastest way to develop. An SDK handles low‑level details so you can focus on your project. Please check the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.

The following code examples demonstrate how to call Aspose.Cells web services using various SDKs: