Add an empty row to an Excel worksheet using Aspose.Cells Cloud API
Contents
[
Hide
]
This REST API adds a new row to an Excel worksheet.
Prerequisites:
- A valid Aspose Cloud access token (Bearer JWT) must be included in the
Authorizationheader. - The target workbook must be uploaded to your Aspose Cloud storage, and the
folderandstorageNameparameters should point to its location.
Notes:
- The
rowIndexis zero‑based; inserting at index 0 adds a row at the top of the worksheet. - Excel worksheets have a maximum of 1,048,576 rows; attempting to insert beyond this limit will result in an error.
REST API
PUT http://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/cells/rows/{rowIndex}
Request parameters
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| name | string | path | The workbook file name. |
| sheetName | string | path | The worksheet name. |
| rowIndex | integer | path | The zero‑based index where the new row will be inserted. |
| folder | string | query | The folder path in storage that contains the workbook. |
| storageName | string | query | The name of the Aspose Cloud 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 following example shows how to make calls to the Cloud API with cURL.
Response Codes
| Code | Description |
|---|---|
| 200 | Row inserted successfully. |
| 400 | Bad request – missing or invalid parameters. |
| 401 | Unauthorized – authentication failed or token missing. |
| 403 | Forbidden – insufficient permissions to modify the workbook. |
| 404 | Not found – the specified workbook or worksheet does not exist. |
| 500 | Internal server error – unexpected condition on the server. |
Cloud SDK Family
Using an SDK is the best way to speed up development. An SDK abstracts low‑level details, allowing you to 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 call Aspose.Cells web services using various SDKs: