Delete all OLE objects in an Excel worksheet
An OLE (Object Linking and Embedding) object is an embedded file such as a Word document, PowerPoint slide, image, or another workbook that resides inside an Excel worksheet.
The Clear operation removes all such OLE objects from a specified worksheet, leaving only the cell data. This is useful for cleaning up legacy spreadsheets or preparing a workbook for redistribution.
REST API
DELETE https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/oleobjects
Request Parameters
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| name | string | path | The name of the workbook. |
| sheetName | string | path | The name of the worksheet. |
| folder | string | query | The folder that contains the workbook. |
| storageName | string | query | The storage name where the workbook is located. |
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 call Aspose.Cells web services. The example below shows how to delete all OLE objects using cURL.
Response Codes
| HTTP Status | Description | Example |
|---|---|---|
| 200 OK | The request succeeded. All OLE objects were removed (or none existed, because the operation is idempotent). | { "Code": 200, "Status": "OK" } |
| 400 Bad Request | Missing or invalid parameters. | { "Code": 400, "Message": "Invalid worksheet name." } |
| 401 Unauthorized | Authentication failed or token missing/expired. | { "Code": 401, "Message": "Access token is invalid." } |
| 404 Not Found | The specified workbook or worksheet does not exist. | { "Code": 404, "Message": "Workbook not found." } |
| 500 Internal Server Error | An unexpected server error occurred. | { "Code": 500, "Message": "Unexpected error." } |
Version / Last Updated
- API version: v3.0
- Document last updated: 2024‑11‑01
Cloud SDK Family
Using an SDK is the fastest way to integrate this operation into your application. An SDK abstracts low‑level details, allowing you to focus on business logic. See the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.
The following code examples demonstrate how to call the DeleteWorksheetOleObjects operation with various SDKs: