//create a new ExcelPackage
using (ExcelPackage excelPackage = new ExcelPackage())
{
//create 2 WorkSheets. One for the source data and one for the Pivot table
ExcelWorksheet worksheetPivot = excelPackage.Workbook.Worksheets.Add("Pivot");
ExcelWorksheet worksheetData = exc...