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();
OutputWorkbook.Worksheets.RemoveAt(“Sheet1”);

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

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

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

            }

OutputWorkbook.Save(outputfilepath);

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.

@Lokeshgorle,

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