I use Get Row Item activity like that:
Although the flowchart run success it get an error: there is no row in position 3.
I want to know the reason. any help? thank you first!
Get Row Item is used to get the value according to a specified column.
In your expression you missed the column name. Actual expression is DataTable.Rows(rowIndex)(ColumnIndex)
In Assign Activity, you can use like this, DT.Rows(3)(4).ToString
thank you your help!
I am a fresh in UI-Path. I want to loop the flowchart. and i use assign to “counter” excel columns number.
I have some questions about “column Index”. could you please help me? thank you!
I would recommend you to use a try-catch block inside the for-each loop, in case if there is any error for one row, it won’t throw you out of gorechho.
Instead of counter, you can use For Each Activity to loop thru the data table.
Eg., For Each item in Send_Email
item(0) or item(“ColumnName”)
item(0) - returns first column value in the current row
item(1) - returns second column value in the current row
thank you very much. I have try use Try Catch activity and it run successfully. But I also have doubt in “Get row item”, error: “there is no row in position 3”…any explanation about that?
Could you please share the excel you are trying to iterate? I will check the issue. it seems to be a data problem.
Here are the example:
This is a common excel problem. If you delete entries cell by cell, those cells look empty but they contain invisible garbage data. If you use DataTable.Count is will return you count more than 3 Delete the entire row by selecting the row ( row3 and onwards), use read range activity , it should read the excel correctly producing data table without any empty row.
I already use Read Range activity and then get row item. I only need to use read range activity??
because I want to read rows one by one.
thank you !