Get Merged Cells from an Excel Worksheet – Aspose.Cells Cloud API

This REST API returns information about merged cells in an Excel worksheet.

Note – The API object is called MergedCell (singular). In the prose we refer to the concept of merged cells (plural).

REST API

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

Authentication

All calls must be authorized with a JWT access token.

  1. Register an application in the Aspose Cloud console to obtain a Client ID and Client Secret.
  2. Request a token via POST https://api.aspose.cloud/connect/token with grant_type=client_credentials.
  3. Include the token in the request header: Authorization: Bearer <jwt token>.

Request parameters

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

The OpenAPI Specification defines a publicly accessible programming interface and lets you 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 example below shows how to make a call to the Cloud API with cURL.

Response model

The JSON payload contains a single MergedCell object with the following properties:

Property Type Description
StartRow int Zero‑based index of the first row in the merged range.
StartColumn int Zero‑based index of the first column in the merged range.
EndRow int Zero‑based index of the last row in the merged range.
EndColumn int Zero‑based index of the last column in the merged range.
link object A self‑reference URL (Href) pointing to the merged‑cell resource.

Error handling

Common HTTP status codes returned by this endpoint:

Status Code Meaning Sample payload
400 Bad request – missing or invalid parameters. { "Code": "400", "Message": "Invalid parameter." }
401 Unauthorized – JWT token is missing or expired. { "Code": "401", "Message": "Authentication failed." }
404 Not found – the specified file, worksheet, or index does not exist. { "Code": "404", "Message": "Resource not found." }
500 Internal server error – unexpected condition on the server. { "Code": "500", "Message": "An unexpected error occurred." }

Handle these responses in your code (e.g., try/catch blocks in SDKs) and retry or correct the request as appropriate.

Cloud SDK Family

Using an SDK is the fastest way to develop against the API. An SDK handles 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 Aspose.Cells web services with various SDKs: