title: “Add a pivot table in an Excel worksheet” second_title: “Document” linktitle: Add type: docs url: /pivot-tables/add/ aliases: [/add-a-pivot-table-in-a-worksheet/] keywords: “Add pivot table, Excel worksheet, Aspose.Cells Cloud, REST API, SDK” description: “Use Aspose.Cells Cloud REST API to add a pivot table to an Excel worksheet. The service is available through multiple SDKs (C#, Java, PHP, Python, Node.js, Android, Swift, Perl, Go).” weight: 30


This REST API adds a pivot table into a worksheet.

REST API

PUT http://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/pivottables

The request parameters are:

Parameter Name Type Location Description
name string path The name of the Excel document.
sheetName string path The name of the worksheet where the pivot table will be created.
request object body CreatePivotTableRequest DTO containing the pivot table definition.
folder string query The folder that contains the document.
storageName string query The name of the storage where the document is located.
sourceData string query The range that provides the source data for the new pivot table cache (e.g., A5:E10).
destCellName string query The address of the upper‑left cell of the destination range for the pivot table report.
tableName string query The name assigned to the new pivot table.
useSameSource boolean query When true, the new pivot table reuses an existing data source, saving memory if another pivot table has already used this source.

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 call the Cloud API with cURL.

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 call Aspose.Cells web services using various SDKs: