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?
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.
Regards,
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 :).
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.
Regards
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?