Hide Rows in Excel Worksheet using Aspose.Cells Cloud API
This REST API hides rows on an Excel worksheet.
Before using the API, ensure you have a valid JWT Bearer token from the Aspose Cloud OAuth endpoint, the target workbook is stored in your Aspose Cloud storage, and you know the worksheet name. The API works with Excel files in XLS, XLSX, and other supported formats.
REST API
POST https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/cells/rows/hide
Request parameters
| Parameter | Type | Location | Description |
|---|---|---|---|
| name | string | path | The name of the workbook file. |
| sheetName | string | path | The name of the worksheet containing the rows to hide. |
| startrow | integer | query | Zero‑based index of the first row to be hidden. |
| totalRows | integer | query | The number of consecutive rows to hide, starting from startrow. |
| folder | string | query | The folder in storage where the workbook is located. |
| storageName | string | query | The name of the storage service. |
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 API requires a JWT Bearer token obtained from the Aspose Cloud OAuth endpoint; include it in the Authorization header. The example below demonstrates how to hide a row using cURL.
Response status codes
| Code | Description |
|---|---|
| 200 | Success – rows hidden |
| 400 | Bad request – invalid parameters |
| 401 | Unauthorized – missing or invalid JWT |
| 404 | Not found – workbook or worksheet does not exist |
| 500 | Server error – internal processing failure |
A successful call returns a JSON object that contains the fields Code and Status. In case of an error, the response includes additional fields such as Message and appropriate HTTP status codes (e.g., 400, 401, 404, 500).
Cloud SDK Family
Using an SDK is the fastest way to integrate this functionality into your application. SDKs handle low‑level details so you can focus on business logic. See the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.
The following code examples demonstrate how to hide rows using various SDKs. (The example filenames reference “Unhide” due to legacy naming; the code inside each gist performs the Hide operation.)