Get a Shape by Index on an Excel Worksheet – Aspose.Cells Cloud Documentation

The GetWorksheetShape API (GET https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/shapes/{shapeindex}) retrieves the description of a specific shape—including its metadata and properties—by index from a named worksheet in an Excel file stored in Aspose.Cells Cloud, enabling developers to programmatically inspect embedded shapes such as charts, images, or AutoShapes without downloading the entire workbook.

The Get Worksheet Shape Web API

GET https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/shapes/{shapeindex}

Security and Authentication

The Aspose.Cells Cloud APIs are secure and require JWT token-based authentication.

Request Parameters

Parameter Name Type Path/Query String/HTTPBody Description
name String Path The file name.
sheetName String Path The worksheet name.
shapeindex Integer Path shape index in worksheet shapes.
folder String Query The folder where the file is situated.
storageName String Query The storage name where the file is situated.

Note: shapeindex is zero‑based; the first shape has index 0. Ensure the workbook is stored in the specified folder and storageName if you are not using the default storage.

Response

[
  {
    "Name": "ShapeResponse",
    "DataType": {
      "Identifier": "Class",
      "Reference": "ShapeResponse"
    }
  }
]

Sample response headers

HTTP/1.1 200 OK
Content-Type: application/json

HTTP Status Codes

Code Meaning Description
200 OK The request completed successfully.
400 Bad Request The request is malformed or one or more parameters are invalid.
401 Unauthorized Authentication failed, or the JWT token is missing or expired.
404 Not Found The requested workbook, worksheet, or resource was not found.
500 Internal Server Error The server encountered an unexpected error while processing the request.

Prerequisites

  • A valid Aspose Cloud access token (Bearer JWT).
  • The workbook must be stored in your Aspose Cloud storage or a specified folder.

How to Use the Get Worksheet Shape API with SDKs?

Get Worksheet Shape API Specification

The Get Worksheet Shape API Specification defines a publicly accessible programming interface and enables you to 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 a call to the Cloud API with cURL.

Use Aspose.Cells Cloud SDKs

Using the SDK is the fastest way to develop, as it abstracts away the low‑level details, allowing you to use the API with short code.
Please check out the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.

The following code examples demonstrate how to make calls to Aspose.Cells web services using various SDKs: