Insert a Slicer into an Excel ListObject – Aspose.Cells Cloud API
Contents
[
Hide
]
This REST API inserts a slicer for a list object on an Excel worksheet.
REST API
POST https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/listobjects/{listObjectIndex}/InsertSlicer
Request Parameters
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| name | String | Path | The name of the Excel file. |
| sheetName | String | Path | The name of the worksheet that contains the list object. |
| listObjectIndex | Integer | Path | The zero‑based index of the list object to which the slicer will be added. |
| columnIndex | Integer | Query | The zero‑based index of the column on which the slicer is based. |
| destCellName | String | Query | The cell reference (e.g., A1) where the slicer will be placed. |
| folder | String | Query | The folder in storage that contains the Excel file. |
| storageName | String | Query | The name of the Aspose Cloud storage service. |
You can use the cURL command‑line tool to call the API:
Response Codes
| HTTP Code | Meaning | Description |
|---|---|---|
| 200 | OK | The slicer was inserted successfully. |
| 400 | Bad Request | Missing or invalid parameters. |
| 401 | Unauthorized | Invalid or missing JWT token. |
| 403 | Forbidden | Insufficient permissions to access the file or storage. |
| 404 | Not Found | The specified file, worksheet, or list object does not exist. |
| 500 | Internal Server Error | An unexpected error occurred on the server side. |
Error Handling
When an error occurs, the API returns a JSON object with an ErrorMessage field that describes the problem. Inspect the HTTP status code and the ErrorMessage to determine the corrective action.
Cloud SDK Family
Using an SDK is the best way to speed up development. An SDK takes care of low‑level details and lets you 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 make calls to Aspose.Cells web services using various SDKs: