Add Horizontal Page Break – Aspose.Cells Cloud API
The Add Horizontal Page Break API inserts a horizontal page break into an Excel worksheet.
Prerequisites & Authentication
A valid JWT token is required for all calls to the Aspose.Cells Cloud API. Obtain the token via the OAuth 2.0 workflow described in the authentication guide, and include it in the request header as Authorization: Bearer <jwt token>. The target workbook must reside in a storage location accessible to the API (default storage or a custom storageName you specify).
REST API
PUT http://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/horizontalpagebreaks
Request Parameters
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| name | string | path | Name of the Excel file. |
| sheetName | string | path | Name of the worksheet where the break will be added. |
| cellname | string | query | Cell reference (e.g., A1) that marks the start of the page break. |
| row | integer | query | Zero‑based row index for the page break. |
| column | integer | query | Zero‑based column index for the page break. |
| startColumn | integer | query | Starting column of a range when inserting a break. |
| endColumn | integer | query | Ending column of a range when inserting a break. |
| folder | string | query | Folder path containing the Excel file. |
| storageName | string | query | Name of the Aspose Cloud storage. |
The OpenAPI Specification defines a publicly accessible interface that lets you perform 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 call the API with cURL.
Response Codes
| HTTP Code | Description |
|---|---|
| 200 | The horizontal page break was added successfully. |
| 400 | Bad request – missing or invalid parameters. |
| 401 | Unauthorized – invalid or missing JWT token. |
| 404 | Not found – the specified workbook or worksheet does not exist. |
| 500 | Internal server error – an unexpected condition occurred. |
For more details on related operations, see the API pages for Get Horizontal Page Breaks and Delete Horizontal Page Break.
Cloud SDK Family
Using an SDK is the fastest way to develop. An SDK abstracts low‑level details so you can focus on your project. Please check 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: