I am using multiple excel files and checking data dynamically so sometimes i need data from datatable and check condition with string variable so there is a issue. When i used writeline(Activity) the output i Got is System.Data.Datarow[] which is the data type but expected output is String value.
I think this may help you:
@bcarp how we can store datarow results in variable?, with logmessage and writeline working fine
Great
Kindly proceed with this, this can be sorted out very easily,
1.Lets take you have a datatable obtained from excel named out_dt
2.now use a for each row loop to iterate through this datatable with one by one datarow
3.Inside the for each row loop use a assign activity with variable to store the value from datatable like
string_value = row(ColumnIndex).Tostring
or
string_value = row(“ColumnName”).Tostring
4.Thats all you are all done
Or to get each each Datarow as a Array then
Inside the for each row use a if condition like this
String.Join(“-“,row.ItemArray()).ToString.Contains(“yourvalue”)
Hope this would help you
Cheers.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.