Help on loop with Dataset table and Append Range activity

Hi comunity, I am trying to write to an excel file what I got from a PDF invoice using UiPath ML. The thing is I am processing N pdf invoices and for each of them I want the extraction appended to an excel file. The issue is on the for each loop, its duplicating the rows. I have just 3 pdf files, but 6 rows on the output excel.
Any clue on what I am missing here?
Thanks in advance team!!!