I have tested your scenario a bit, but could not find the issue. Kindly try the attached version v5.2.1.1. If you still find the issue, kindly do create a sample console Application, zip it and post it here to show the issue, we will check your issue soon.
Attached please find a sample colsole app that show the issue. We are in the middile of procuring the license. Therefore, there is no license file in the zip file.
I used Aspose.Cells for .NET v5.2.1.1 to test your issues. I got the following issues using your template file(containing pivot table) and sample project code while calling the APIs:
I have logged your issue into our issue tracking system with an id: CELLSNET-22934. We will soon look into your issues. Once we have any update, we will let you know.