Workflow not working correctly after adding a for each loop

Hi, first I was checking with the workflow (attached below) each row with a row of a main file, if they are identical or not. but after adding a for each loop which should basicly iterate through a folder with diffrent files and compare them to the main file, the message box is displaying nonesense. for the first file it says “rows with the identical content: 0, rows with diffrent content: 0” after that for the other file in the folder “rows with identical content: 334, rows with diffrent content: 67”

ExcelSync2.xaml (13.5 KB)

thanks for the help

Update: now it won’t start at all.

@B.D
image
image
Sheet name should be enclosed in double quotes. try running now.

Hi, sorry. that was just an example. the sheet name is actually diffrent.

is there a logic flaw ? one would would assume integrating somethig simple as a loop wouldn’t cause any problems. or is it because DT1 doesn’t behave like a normal variable and has to be initialized after looping through each time ? because otherwise I can’t explain why it is behaving in such a way.

Can u try by initializing the DTs.