Thanks for your posting and using Aspose.Cells.
We were able to observe this issue as per your description by running your code with your sample excel file using the latest version: Aspose.Cells for .NET v126.96.36.199 and found Aspose.Cells gets stuck on refreshing the pivot table.
We have logged this issue in our database for investigation. We will look into it and fix this issue. Once the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as
- CELLSNET-44377 - Aspose.Cells gets stuck on refreshing pivot table
Please try our latest version/fix: Aspose.Cells for .NET v21.6.3 (attached)
Aspose.Cells21.6.3 For .Net2_AuthenticodeSigned.Zip (5.5 MB)
Aspose.Cells21.6.3 For .Net4.0.Zip (5.5 MB)
Aspose.Cells21.6.3 For .NetStandard20.Zip (5.5 MB)
Your issue should be fixed in it.
Let us know your feedback.