Get page count from an Excel File

This REST API returns the page count for a workbook.

REST API

GET http://api.aspose.cloud/v3.0/cells/{name}/pagecount

The request parameters

Parameter Name Type Location Required Description
name string path Yes The name of the Excel document.
folder string query No The folder that contains the document.
storageName string query No The name of the 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 REST API easily. The following example shows how to call the endpoint with cURL.

Response Schema

HTTP Status Data Type Description
200 integer The total number of printable pages in the workbook (e.g., 13).
4xx‑5xx JSON Error object (see Error Handling section).

Cloud SDK Family

Using an SDK is the best way to speed up the development. An SDK takes care of 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:

Error Handling

HTTP Status Description Example JSON Body
401 Invalid or missing JWT token. { "Code": "InvalidAuthenticationToken", "Message": "Access token is missing or invalid." }
404 The specified workbook could not be found. { "Code": "FileNotFound", "Message": "The requested file does not exist." }
400 Bad request – missing required parameters. { "Code": "BadRequest", "Message": "Required parameter 'name' is missing." }
500 Internal server error. { "Code": "InternalError", "Message": "An unexpected error occurred." }