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).

PutHorizontalPageBreak API

PUT https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/horizontalpagebreaks

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 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.

Example of an error response when the JWT token is missing or invalid:

{
  "Code": 401,
  "Status": "Unauthorized",
  "Message": "Invalid or missing JWT token."
}

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.

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: