For each on data table breaks at the end of first row

Hi people, I want to ask you about an issue I am facing with for each on data table.
I developed a solution that loops over a data table that is get from reading an Excel file. The notebook I used for the development had installed Windows 7 and Excel 2013.
But when I copied it to a pc that has Windows 10 and Excel 2016 when for each loops over data table it breaks/finishes when it reaches last column from first row.
Did you faced the same issue? Do you know why this happens?


What’s the error message you are getting?
How many rows there in Excel?
Try with debug mode, check step by step where it’s getting issue once.

Hi Megharajky, I am not getting error, It just finish looping at the end of first row.
There are 30 rows in Excel.
I will try but it is a bit difficult because the notebook where I face the issue it is a notebook for ‘deployment’ not for developing.

On which activity does it block within the for each?
If it is a get row item, is the column name still the same? Or if you are using the column index, does it still exist?

You will probably need to provide more information - for example by sharing some screenshots or the workflow. And informing us on what activity it is blocking within the for each :).

Kind regards

Hi, I am using for each row activity. I cannot share the whole project but attached there are some screenshots. Please tell me if it is useful to understand this issue.

You are never exiting the Do While because there is no way to go to the next record in a do while. If you remove the Do While and place your sequence in the for each this will fix your problem.

Hi bcarp, It exits from Do While because the program finishes. Do While is just for looping over Columns but I think the problem is on For Each Row that does not realize that it has to go to the next row.

Instead of looping through the columns via a do while you could try to get the value of the row corresponding to the column via the activity ‘get row item’.

I dont think you will need the do while then. That’s how I usually do it but i’m not sure it is a best practice - but it works :-).

Hi Yannip, inside Do While I have too many steps but I have a doubt about what you say, which value do you assign as a column if you use Get Row Item activity?

Hey… Are you printing the count of the rows any where? Can you please recheck on the Excel read range "range " property.

Hi @marcelo.costas.iron

Your GetRowItem is correct, annother way is get the value direct row.Item(ColumnIndex).

Did you execute your solution in debug mode? Put a breakpoint in the For each Row activity and go step by step to try to find where is the problem.

With the information sent I couldn’t catch any throuble.

Good Luck, Regards

You either put the number of the column in the column index property, or the exact name of the column between “” in the column name property.