Auto‑fit columns in an Excel file

This REST API supports auto‑fitting columns in an Excel workbook.

PostAutofitWorkbookColumns API

POST https://api.aspose.cloud/v3.0/cells/{name}/autofitcolumns

The request parameters are:

Parameter Name Type Location Description
name string path The name of the workbook file.
autoFitterOptions object body Options that control the auto‑fit behavior.
startColumn integer query Zero‑based index of the first column to auto‑fit.
endColumn integer query Zero‑based index of the last column to auto‑fit.
folder string query The folder that contains the workbook.
storageName string query The name of the storage service.

The OpenAPI Specification{:rel=“noopener noreferrer”} 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 easily access Aspose.Cells web services. The following example shows how to call the Cloud API with cURL.

Prerequisites

Before calling this operation, ensure that you have a valid Aspose Cloud API key, a generated JWT token, and that the target workbook already exists in the specified storage location.

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.

The API can return the following HTTP status codes:

Code Description
200 Success – columns auto‑fitted
400 Bad request – missing or invalid parameters
401 Unauthorized – invalid or expired JWT
500 Server error – internal processing failure

Cloud SDK Family

Using an SDK is the most efficient way to accelerate development. An SDK handles low‑level details so you can focus on your project logic. Please check out the GitHub repository{:rel=“noopener noreferrer”} for a complete list of Aspose.Cells Cloud SDKs.

The following code examples demonstrate how to call Aspose.Cells web services using various SDKs: