Get a Pivot Table in an Excel Worksheet

This REST API retrieves worksheet pivot table information by its index.

REST API

GET https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/pivottables/{pivottableIndex}

Request parameters

Parameter Name Type Location Description
name string path The name of the Excel file.
sheetName string path The name of the worksheet that contains the pivot table.
pivottableIndex integer path Zero-based index of the pivot table in the worksheet.
folder string query The folder where the document is stored.
storageName string query The name of the Aspose Cloud storage.

You can use the cURL command‑line tool to access Aspose.Cells web services easily. The following example shows how to call the API with cURL.

Error handling

The API follows standard HTTP status codes. Typical responses include:

Status Code Meaning Example JSON (error)
200 Success – the pivot table is returned
401 Unauthorized – invalid or missing token {"code":401,"message":"Invalid access token."}
404 Not found – file, worksheet, or pivot‑table index does not exist {"code":404,"message":"Pivot table not found."}
500 Server error – unexpected condition {"code":500,"message":"Internal server error."}

Review the status code and error message to troubleshoot issues.

Cloud SDK Family

Using an SDK is the best way to speed up development. An SDK handles low‑level details so you can 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: