Add an Icon Filter to an Excel Worksheet – Aspose.Cells Cloud Documentation

REST API

This REST API adds an icon filter to an Excel worksheet using the Aspose.Cells Cloud REST API.

Background: An icon filter applies a visual icon set to cells based on their values, allowing quick visual analysis of data trends. Common use‑cases include highlighting performance metrics, status indicators, or categorizing values with traffic‑light icons directly within Excel worksheets.

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

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 (e.g., A1:B1) to which the filter will be applied.
fieldIndex integer Query Zero‑based index of the column that the filter targets.
iconSetType string Query The icon set to use. Allowed values: Arrows3, ArrowsGray3, Flags3, Signs3, Symbols3, Symbols32, TrafficLights31, TrafficLights32, Arrows4, ArrowsGray4, Rating4, RedToBlack4, TrafficLights4, Arrows5, ArrowsGray5, Quarters5, Rating5, Stars3, Boxes5, Triangles3, None, CustomSet, Smilies3, ColorSmilies3.
iconId integer Query The identifier of the specific icon within the selected icon set.
matchBlanks boolean Query Determines whether blank cells are included (true or false).
refresh boolean Query Indicates whether the filter should be refreshed after applying (true or false).
folder string Query The folder that contains the original workbook.
storageName string Query The name of the storage where the workbook resides.

Response

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

Response Status Codes

Code Meaning Description
200 OK Compression succeeded; response contains compressed file 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 PutWorksheetIconFilter API with SDKs

PutWorksheetIconFilter API Specification

The OpenAPI Specification defines a publicly accessible programming interface and lets you carry out 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 make a call to the Cloud API with cURL.

Use Aspose.Cells Cloud SDKs

Using an SDK is the best way to speed up development. An SDK handles low‑level details, allowing you to focus on your project tasks. Please check out 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:

For other AutoFilter capabilities, see the documentation on Add Color Filter, Add Date Filter, and Clear AutoFilter.