Update Cell Style for Pivot Table
This REST API updates the style of a cell in a pivot table.
Prerequisites / Authentication
To call this endpoint you must have a valid Aspose Cloud JWT access token. Obtain the token through the OAuth 2.0 flow described in the Authentication Guide. Include the token in the request header:
Authorization: Bearer <jwt token>
REST API
POST https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/pivottables/{pivotTableIndex}/Format
Request parameters
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| name | string | path | Document name (required). |
| sheetName | string | path | Worksheet name (required). |
| pivotTableIndex | integer | path | Index of the pivot table (required). |
| column | integer | query | Zero‑based column index of the cell to format (required). |
| row | integer | query | Zero‑based row index of the cell to format (required). |
| style | object | body | Style DTO (data‑transfer object) that defines the new cell style. |
| needReCalculate | boolean | query | Indicates whether the pivot table should be recalculated after styling. The default value is false. |
| folder | string | query | Folder where the document is stored (optional). |
| storageName | string | query | Name of the storage (optional). |
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 web services easily. The following example shows how to make a call to the Cloud API with cURL.
Response
On success the service returns HTTP 200 with an empty body indicating that the style has been applied. In case of an error, a JSON payload with an error code and message is returned.
| HTTP Status | Description |
|---|---|
| 200 | Style applied successfully. |
| 400 | Bad request – e.g., invalid column/row index. |
| 401 | Unauthorized – missing or invalid JWT token. |
| 404 | Not found – specified document, worksheet, or pivot table does not exist. |
| 500 | Internal server error – unexpected condition. |
Cloud SDK Family
Using an SDK is the fastest way to develop. An SDK abstracts low‑level details, allowing you to focus on your business logic. Please check out the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.
The following code example demonstrates how to call Aspose.Cells web services using the Go SDK: