Get Worksheet Comment – Aspose.Cells Cloud API Documentation
This REST API retrieves a worksheet comment by cell name using Aspose.Cells Cloud.
Prerequisites: To call this operation you must include a valid JWT access token in the Authorization header (Bearer <jwt token>). Tokens can be obtained via the Aspose.Cells Cloud authentication flow described in the Authentication guide.
REST API
GET https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/comments/{cellName}
Request Parameters
| Parameter Name | Type | Location (URL Path / Query String) | Description |
|---|---|---|---|
| name | string | URL Path | The name of the Excel file. |
| sheetName | string | URL Path | The name of the worksheet that contains the comment. |
| cellName | string | URL Path | The cell address (e.g., A1) whose comment is being retrieved. |
| folder | string | Query String | The folder path where the document is stored. |
| storageName | string | Query String | The name of the storage service. |
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 following example shows how to make a call to the Cloud API with cURL.
Response: The API returns a JSON object containing a Comment object with the following fields:
| Field | Type | Description |
|---|---|---|
CellName |
string | Address of the cell (e.g., A1). |
Author |
string | Name of the comment’s author. |
HtmlNote |
string | Comment content in HTML format (if any). |
Note |
string | Plain‑text version of the comment. |
AutoSize |
boolean | Indicates whether the comment box auto‑sizes. |
IsVisible |
boolean | Determines if the comment is visible. |
Width |
integer | Width of the comment box (in characters). |
Height |
integer | Height of the comment box (in characters). |
TextHorizontalAlignment |
string | Horizontal alignment of the text (e.g., Bottom). |
TextOrientationType |
string | Orientation of the text (e.g., TopToBottom). |
TextVerticalAlignment |
string | Vertical alignment of the text (e.g., Bottom). |
Common Errors
- 401 Unauthorized – Verify that the JWT token is valid, not expired, and correctly placed in the
Authorizationheader. - 404 Not Found – Ensure the file name, worksheet name, and cell address are correct and that the file exists in the specified folder/storage.
- 500 Internal Server Error – Check the request payload for malformed data and confirm that the service is operational.
Status Codes
| Code | Meaning |
|---|---|
| 200 | Comment retrieved successfully. |
| 401 | Unauthorized – invalid or missing JWT token. |
| 404 | Not Found – specified file/worksheet/comment does not exist. |
| 500 | Internal Server Error – unexpected server condition. |
Cloud SDK Family
Using an SDK is the best way to speed up development. An SDK handles low‑level details and lets you focus on your project tasks. 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: