Get Named Ranges on an Excel Workbook – Aspose.Cells Cloud API
This REST API returns information about named ranges defined within worksheets.
Background – A named range is a user‑defined identifier that refers to a specific cell or block of cells in a worksheet. Named ranges simplify formula creation, improve readability, and enable programmatic access to frequently used areas of a workbook.
Prerequisites – Access to the Aspose.Cells Cloud API requires a valid JWT access token. Obtain the token by authenticating with your Aspose Cloud client ID and client secret via the OAuth 2.0 token endpoint. Include the token in the Authorization: Bearer <jwt token> header of every request.
GetNamedRanges API
GET https://api.aspose.cloud/v3.0/cells/{name}/worksheets/ranges
Security and Authentication
The Aspose.Cells Cloud APIs are secure and require JWT token-based authentication.
Request parameters
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| name | string | Path | The name of the Excel document. |
| folder | string | Query string | The folder that contains the document. |
| storageName | string | Query string | The storage name where the document resides. |
HTTP Status Codes
| Code | Meaning | Description |
|---|---|---|
| 200 | OK | Filter applied successfully; response contains operation details. |
| 400 | Bad Request | Missing or invalid parameters (e.g., unsupported file type). |
| 401 | Unauthorized | Invalid or missing JWT token. |
| 413 | Payload Too Large | Uploaded file exceeds size limit. |
| 500 | Internal Server Error | Unexpected server error. |
The OpenAPI Specification defines a publicly accessible programming interface that 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 demonstrates how to retrieve named ranges using cURL.
Response Model
| Field | Type | Description |
|---|---|---|
ColumnCount |
integer | Number of columns in the range. |
ColumnWidth |
number | Width of each column (in points). |
FirstColumn |
integer | Zero‑based index of the first column in the range. |
FirstRow |
integer | Zero‑based index of the first row in the range. |
Name |
string | The user‑defined name of the range. |
RefersTo |
string | A formula that defines the cell reference (e.g., =Sheet1!$B$10:$H$10). |
RowCount |
integer | Number of rows in the range. |
RowHeight |
number | Height of each row (in points). |
Worksheet |
string | Name of the worksheet that contains the range. |
Cloud SDK Family
Using an SDK is the fastest way to integrate this functionality. SDKs handle 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 using various SDKs: