Thanks for providing us further details.
After further tests, I am able to observe the issue as you mentioned by using your sample code but with your template file “wine_sample_template.xlsx”. I found Pivot table is not refreshed and corrupted after updating the source data in the output file. The output file is rather corrupt and MS Excel prompts some error messages regarding PivotTable when opening the output file into it. Hence, the data is not sorted out at all. I have logged a ticket with an id “CELLSJAVA-42474” for your issue. We will look into it soon.
Once we have an update on it, we will let you know here.