We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Copying pivots causing issue

Hi team,

I have three workbooks and each workbook has a pivot table worksheet(containing pivot table and page filters) and its source data worksheet. I want to have all three pivots in one work book. when I’m copying each pivot sheet into the new workbook, the output workbook has pivot table and filters working fine in 1st sheet but the remaining sheets have only values pasted but not as pivot table and filters are not responsive(no dropdown available to choose filters).

i have tried interchanging the order of copying the sheets. in every case, the first sheets that is copied, is working good and the remaining two sheets have issue with filters.

below is the snippet:
Workbook OutputWorkbook = new Workbook();

            using (Workbook workbook1 = new Workbook(downloadPath + @"/workbook1.xlsx"))
                 Worksheet worksheet = OutputWorkbook.Worksheets.Add("Pivotsheet1");

            using (Workbook workbook2 = new Workbook(downloadPath + @"/workbook2.xlsx"))
                Worksheet worksheet = OutputWorkbook.Worksheets.Add("Pivotsheet2");

            using (Workbook workbook3 = new Workbook(downloadPath + @"/workbook3.xlsx"))
                Worksheet worksheet = OutputWorkbook.Worksheets.Add("Pivotsheet3");



upon opening the output workbook, it prompts for repaired mode. when clicked on yes, i get:
Removed Part: /xl/pivotTables/pivotTable2.xml part. (PivotTable view)
Removed Part: /xl/pivotTables/pivotTable3.xml part. (PivotTable view)

I have also tried workbook.combine(workbook1) option.


Could you please zip and attach the three source Excel files. We will check your issue soon.