Pivot Table in UI path

Hi can anyone here help me with the pivot excel sheets .

I have a pivot table template .I want to write the data extracted from first excel and write it to the pivot excel sheet and rename the file dynamically .

Thanks in advance !