Working with Excel pictures – Aspose.Cells Cloud Documentation

Working with pictures on an Excel file

This guide explains how to work with pictures (also called images) in Excel worksheets through the Aspose.Cells Cloud REST API. It covers the main picture‑related operations—retrieving, adding, updating, and deleting Excel pictures—and points you to detailed examples for each task.

Prerequisites: an Aspose.Cells Cloud account, a valid API key, and the appropriate SDK installed for your chosen language.

API reference

Get a specific format picture

HTTP Method Endpoint Required Parameters Sample Request Sample Response Status Codes
GET /cells/{fileName}/worksheets/{sheetName}/pictures/{pictureIndex} fileName (path), sheetName (path), pictureIndex (path), format (query) GET https://api.aspose.cloud/v3.0/cells/myBook.xlsx/worksheets/Sheet1/pictures/0?format=png Binary image data (PNG, JPEG, etc.) 200 OK, 400 Bad Request, 401 Unauthorized, 404 Not Found, 500 Server Error

Get all pictures information

HTTP Method Endpoint Required Parameters Sample Request Sample Response Status Codes
GET /cells/{fileName}/worksheets/{sheetName}/pictures fileName (path), sheetName (path) GET https://api.aspose.cloud/v3.0/cells/myBook.xlsx/worksheets/Sheet1/pictures JSON array with picture metadata (index, name, position, size) 200 OK, 400, 401, 404, 500

Add a picture

HTTP Method Endpoint Required Parameters Sample Request Body Sample Response Status Codes
POST /cells/{fileName}/worksheets/{sheetName}/pictures fileName (path), sheetName (path) { "image": "<base64‑encoded‑image>", "upperLeftRow": 5, "upperLeftColumn": 2, "width": 200, "height": 150 } { "code": 200, "status": "OK", "pictureIndex": 3 } 201 Created, 400, 401, 404, 500

Update a picture

HTTP Method Endpoint Required Parameters Sample Request Body Sample Response Status Codes
PUT /cells/{fileName}/worksheets/{sheetName}/pictures/{pictureIndex} fileName (path), sheetName (path), pictureIndex (path) { "upperLeftRow": 10, "upperLeftColumn": 4, "width": 300, "height": 250 } { "code": 200, "status": "OK" } 200 OK, 400, 401, 404, 500

Delete all pictures

HTTP Method Endpoint Required Parameters Sample Request Sample Response Status Codes
DELETE /cells/{fileName}/worksheets/{sheetName}/pictures fileName (path), sheetName (path) DELETE https://api.aspose.cloud/v3.0/cells/myBook.xlsx/worksheets/Sheet1/pictures { "code": 200, "status": "All pictures deleted." } 200 OK, 400, 401, 404, 500

Delete a specific picture

HTTP Method Endpoint Required Parameters Sample Request Sample Response Status Codes
DELETE /cells/{fileName}/worksheets/{sheetName}/pictures/{pictureIndex} fileName (path), sheetName (path), pictureIndex (path) DELETE https://api.aspose.cloud/v3.0/cells/myBook.xlsx/worksheets/Sheet1/pictures/2 { "code": 200, "status": "Picture deleted." } 200 OK, 400, 401, 404, 500

Related topics

Explore other image‑related operations in Aspose.Cells Cloud: