Hi,
Help on this!!!
am using "Read range"activity to read data from excel file,and using “For each row” to get data ,here am facing issue that instead of the data from the excel it is taking “System.data.datarow” each time.
Thanks in advance
Hi,
Help on this!!!
am using "Read range"activity to read data from excel file,and using “For each row” to get data ,here am facing issue that instead of the data from the excel it is taking “System.data.datarow” each time.
Thanks in advance
Every datarow has multiple items.
To get the first one use row(0) or row.item(0)
The read range activity outputs the data into a datatable. It is a collection of rows with multiple columns basically. So you need to loop through the rows. So if you want to access data in each row, we use the for each activity…
In ths for each loop you can access every row and its column by either index or the column name…
With index
Row(0) or row.item(0)
0 will be needed to be replaced with a counting number variable to access data of each row…
Or else…
Row(“columnName”)
Both will work fine for you…
To Add to the solution provided by @Lahiru.Fernando
in your foreach, instead of Row.tostring, use row(columns)
In below screenshot, i am trying to display values from “Column-0” and “Column-1” as Log messages.