Create Pivot Table

Introduction

Please use PivotTableCollection.Add() method to create a pivot table inside the worksheet. Once, the pivot table is created, you can work with it using the PivotTable class.

Create Pivot Table

The following sample code shows how to create a pivot table and work with it. Please check the output excel file generated with this code and the following screenshot showing the output excel file in Microsoft Excel.

todo:image_alt_text

Sample Code