Add Date Filter to an Excel Worksheet
Contents
[
Hide
]
This REST API adds a date filter to an Excel worksheet.
REST API
PUT https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/autoFilter/dateFilter
Request parameters
The request parameters are listed below:
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| name | string | Path | The workbook name. |
| sheetName | string | Path | The worksheet name. |
| range | string | Query | Excel range to which the filter is applied (e.g., A1:B1). |
| fieldIndex | integer | Query | Zero‑based index of the column to filter. |
| dateTimeGroupingType | string | Query | Grouping type for the date/time filter. Allowed values are Day, Hour, Minute, Month, Second, Year. Values are case‑sensitive; the default is Day. |
| year | integer | Query | Year component of the filter value. |
| month | integer | Query | Month component of the filter value. |
| day | integer | Query | Day component of the filter value. |
| hour | integer | Query | Hour component of the filter value. |
| minute | integer | Query | Minute component of the filter value. |
| second | integer | Query | Second component of the filter value. |
| matchBlanks | boolean | Query | Include blank cells (true or false). |
| refresh | boolean | Query | Refresh the filter after applying (true or false). |
| folder | string | Query | Folder path of the original workbook. |
| storageName | string | Query | Name of the storage service. |
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 make a call to the Cloud API with cURL.
Error responses
| HTTP Status | Code | Message | Description |
|---|---|---|---|
| 400 Bad Request | 400 | Invalid range format. Expected A1:B1. | The range query parameter is malformed or missing. |
| 401 Unauthorized | 401 | Access token is missing or invalid. | Authentication failed; obtain a valid JWT token. |
| 404 Not Found | 404 | Workbook or worksheet not found. | The specified name or sheetName does not exist. |
| 500 Internal Server Error | 500 | Unexpected server error. | An unhandled exception occurred on the server. |
The successful response contains two fields:
- Code – HTTP status code returned by the API (200 for success).
- Status – Textual description of the result.
Cloud SDK Family
Using an SDK is the fastest way to develop. An SDK handles low‑level details so you can 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: