Update an OLE Object in an Excel Worksheet

This REST API updates an OLE object in an Excel worksheet.

REST API

POST http://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/oleobjects/{oleObjectIndex}

The request parameters are:

Parameter Name Type Parameter Location Description
name string path The workbook name.
sheetName string path The worksheet name.
oleObjectIndex integer path Index of the OLE object within the worksheet.
ole object body JSON representation of the OLE object to be updated.
folder string query The folder that contains the workbook.
storageName string query The name of the storage service.

Request Body Fields

Field Type Required Description
ImageSourceFullName string optional Path to the image file used for the OLE object.
IsAutoSize boolean optional Whether the OLE object should be auto‑sized.
SourceFullName string required The source file (e.g., an image or chart) for the OLE.
UpperLeftRow integer required Row index (zero‑based) of the upper‑left corner.
UpperLeftColumn integer required Column index (zero‑based) of the upper‑left corner.
Left integer optional Horizontal offset, in points, from the upper‑left corner.
Top integer optional Vertical offset, in points, from the upper‑left corner.
Width integer required Width of the OLE object, in points.
Height integer required Height of the OLE object, in points.

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 call the Cloud API with cURL.

Error Responses

HTTP Status Code Message
400 4000 Bad request – missing or invalid parameters.
401 4010 Unauthorized – invalid or missing JWT token.
404 4040 Not found – workbook, worksheet, or OLE object does not exist.
500 5000 Internal server error – unexpected failure on the server side.

When to Use This API?

Use this endpoint when you need to modify an existing OLE object—such as an embedded image, chart, or document—without re‑uploading the entire worksheet. Typical scenarios include updating the image source, resizing the object, or changing its position after the workbook has been generated.

Cloud SDK Family

Using an SDK is the fastest way to develop. An SDK abstracts low‑level details so you can focus on your project. Please check 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: