Storing data of a block design experiment into one excel file for each participant

I am designing a block design experiment with 24 blocks. I put a loop for each block and then I get a separate Excel file for each block. What changes should I make to get one Excel file for each participant with data from each trial and blocks in one row of that Excel file?
I am new to PsychoPy.