Convert Table to Pivot Table – Aspose.Cells Cloud Documentation
This REST API creates a pivot table from a list object.
A pivot table summarizes data from a list object, allowing you to analyze and report on large data sets directly within the workbook.
Prerequisites:
- A valid JWT bearer token for authentication.
- The workbook must exist in the specified storage location.
- The target worksheet must contain the list object you want to summarize.
PostWorksheetListObjectSummarizeWithPivotTable API
POST https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/listobjects/{listObjectIndex}/SummarizeWithPivotTable
Security and Authentication
The Aspose.Cells Cloud APIs are secure and require JWT token-based authentication.
Request parameters
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| name | string | path | Workbook file name. |
| sheetName | string | path | Worksheet that contains the list object. |
| listObjectIndex | integer | path | Index of the list object in the worksheet. |
| destsheetName | string | query | Name of the destination worksheet. |
| request | object | body | JSON payload that defines the pivot table. |
| folder | string | query | Folder path where the workbook resides. |
| storageName | string | query | Name of the storage. |
The request body must follow the JSON schema defined below:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"Name": { "type": "string", "description": "Name of the new pivot table." },
"DestCellName": { "type": "string", "description": "Top‑left cell of the pivot table (e.g., \"C1\")." },
"PivotFieldRows": {
"type": "array",
"items": { "type": "integer" },
"description": "Zero‑based indices of fields to place in rows."
},
"PivotFieldColumns": {
"type": "array",
"items": { "type": "integer" },
"description": "Zero‑based indices of fields to place in columns."
},
"PivotFieldData": {
"type": "array",
"items": { "type": "integer" },
"description": "Zero‑based indices of fields to use as data fields."
}
},
"required": ["Name", "DestCellName", "PivotFieldRows", "PivotFieldColumns", "PivotFieldData"]
}
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 calls to the Cloud API with cURL.
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. |
Cloud SDK Family
Using an SDK is the best way to speed up development. An SDK handles 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: