hi friends:
I use Get Row Item activity like that:
(row): DataTable.Rows(counter)
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
hi karthikByggari
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
hi Tuhin:
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?
Hi @ANNE,
Could you please share the excel you are trying to iterate? I will check the issue. it seems to be a data problem.
Thanks, Tuhin
hi Tuhin:
Here are the example:
company | department | manager | email address |
---|---|---|---|
miya | administration | kary | kary@123 |
miya | purchase | Johnny | johnny@123 |
miya | IT | daisy | daisy@123 |
Hi Anne,
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.
hi Tuhin
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 !