Update Multiple Cells Style – Aspose.Cells Cloud API Reference (v3.0)
v3.0 – Updated 2024‑11‑01
This REST API sets the style for a range of cells in an Excel workbook.
REST API
Authentication
To call this endpoint you must include a valid JWT access token in the Authorization header.
- Request a token from the Aspose Cloud OAuth endpoint (
/connect/token) using your client‑id and client‑secret. - The response contains an
access_token. - Include the token in each request:
Authorization: Bearer <access_token>
Note: The token expires after a configurable period; obtain a new token when it expires.
Endpoint
POST https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/cells/style
Request parameters
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| name | string | path | Workbook name. |
| sheetName | string | path | Worksheet name. |
| range | string | query | The cell range (e.g., A1:A10). |
| style | object | body | JSON object that defines the style to apply. |
| folder | string | query | Folder that contains the workbook. |
| storageName | string | query | Name of the storage. |
Style object
The style JSON object represents cell formatting. It may contain any of the following optional properties:
- Font – Font settings (
Name,Size,IsBold,IsItalic,Color, etc.). - BackgroundColor – Background color in ARGB format.
- ForegroundColor – Foreground color in ARGB format.
- Name, CultureCustom, Custom – Additional style metadata.
Only the properties you need to change have to be supplied; omitted properties retain their existing values.
The OpenAPI Specification provides the full schema.
Request
Error handling
The API can return the following error responses:
| HTTP Status | Description | Example JSON |
|---|---|---|
| 400 Bad Request | Invalid request parameters (e.g., malformed range). | { "Code": 400, "Message": "Invalid range format." } |
| 401 Unauthorized | Missing or invalid JWT token. | { "Code": 401, "Message": "Authentication failed." } |
| 404 Not Found | Specified workbook or worksheet does not exist. | { "Code": 404, "Message": "Workbook not found." } |
| 500 Internal Server Error | Unexpected server error. | { "Code": 500, "Message": "An unexpected error occurred." } |
Cloud SDK Family
Using an SDK is the best way to speed up 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: