Delete All Pivot Tables in an Excel Worksheet

When you need to reset a worksheet’s analysis, you can remove all pivot tables in a single call. This REST API deletes all pivot tables from a worksheet.

REST API

DELETE https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/pivottables

Request parameters

Parameter Name Type Location Description
name string path Required. The name of the Excel file.
sheetName string path Required. The name of the worksheet.
folder string query The folder that contains the file (optional).
storageName string query The storage name to use (optional).

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

cURL example

curl -v "https://api.aspose.cloud/v3.0/cells/Sample_Pivot_Table_Example.xls/worksheets/Sheet2/pivottables?folder=SampleFolder&storageName=MyStorage" \
  -X DELETE \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt token>"

Response

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

Error handling

HTTP Status Meaning Example error payload
400 Bad Request – missing or invalid parameters { "Code": 400, "Message": "Missing required parameter 'name'." }
401 Unauthorized – invalid or expired JWT { "Code": 401, "Message": "Invalid authentication token." }
404 Not Found – file or worksheet does not exist { "Code": 404, "Message": "Worksheet not found." }
500 Internal Server Error – unexpected failure { "Code": 500, "Message": "An unexpected error occurred." }

Cloud SDK Family

Using an SDK speeds up development. An SDK abstracts low‑level details so you can focus on your business logic. See the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.

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