Delete All Charts from a Worksheet using Aspose.Cells Cloud API
This REST API deletes all charts from the specified worksheet.
Background – Removing all charts from a worksheet is useful when you need to reset a sheet’s visual layout, replace outdated visualizations, or prepare a workbook for reuse without retaining previous chart data.
Before calling the API, ensure the following prerequisites are met:
- A valid JWT token is available for authentication.
- The workbook file exists in the specified storage location and folder.
- You are using API version v3.0.
DeleteWorksheetClearCharts API
DELETE https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/charts
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 | Name of the workbook file. |
| sheetName | string | path | Name of the worksheet. |
| folder | string | query | Folder where the workbook is stored. |
| storageName | string | query | Name of the storage. |
Request Headers
| Header | Description |
|---|---|
| Authorization | Bearer <jwt token> |
| Accept | application/json |
| Content-Type | application/json (no body) |
Request Body
The DELETE operation does not require a request body.
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. |
Example error responses
// 400 Bad Request
{
"Code": 400,
"Message": "Invalid parameter: 'sheetName' is required."
}
// 401 Unauthorized
{
"Code": 401,
"Message": "Authentication failed. Invalid JWT token."
}
// 413 Payload Too Large
{
"Code": 413,
"Message": "The request payload exceeds the maximum allowed size."
}
// 500 Internal Server Error
{
"Code": 500,
"Message": "An unexpected error occurred on the server."
}
How to Use the DeleteWorksheetClearCharts API with SDKs
DeleteWorksheetClearCharts 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 calls to the Cloud API with cURL.