Aspose.Cells Cloud API – Get MaxDataColumn of an Excel Worksheet (v3.0)
Contents
[
Hide
]
This REST API returns the maximum data‑column index in an Excel worksheet when the cellOrMethodName parameter is set to maxdatacolumn.
cURL Example
Request Details
- HTTP Method:
GET - Endpoint pattern:
https://api.aspose.com/v3.0/cells/{fileName}/worksheets/{sheetName}/cells/maxdatacolumn - Path parameters:
fileName– Name of the Excel file (e.g.,myWorkbook.xlsx).sheetName– Name of the worksheet (e.g.,Sheet1).
- Headers:
Authorization: Bearer <access_token>(required)Accept: application/json(recommended)
Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
fileName |
Path | string | Yes | The Excel file name stored in the cloud storage. |
sheetName |
Path | string | Yes | The worksheet from which to obtain the maximum data column. |
cellOrMethodName |
Path | string | Yes | Must be set to maxdatacolumn to invoke this operation. |
Responses
| Status Code | Description | Example Payload |
|---|---|---|
| 200 | Success – returns the max data column index. | { "MaxDataColumn": 12 } |
| 401 | Unauthorized – invalid or missing access token. | { "error": "Invalid authentication." } |
| 404 | Not Found – file or worksheet does not exist. | { "error": "Resource not found." } |
| 500 | Internal Server Error – unexpected condition. | { "error": "Server error." } |
Error Handling
If the request fails, inspect the HTTP status code and the error message in the response body. Ensure the access token is valid and the specified file and worksheet exist in your Aspose Cloud storage.
- Use Aspose.Cells Cloud SDKs
Using an SDK is the most efficient way to accelerate development. An SDK handles 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: