i had an excel in that i do have some values 1,2,3,4,5 i am using for each row in the data table i am getting 1,2,3,4,5 values at a time i need first (1)value first after finishing my work then i will call (2) second one then after (3) …
welcome to the community!
The value you mentioning should be in column of the excel file and that is the reason you getting all of them at once. If the values 1,2,3,… are in a separate rows then using the each row will give you one value as you want. You can refer about each row of data table here.
If you want to iterate through you columns values and they are “,” delimited values then use split function from string and can loop through the values.
Sidd!
Hello @rohit_di
Is this values 1,2,3,4,5 available in the excel as rows? If yes, for each row in datatable should work.
Else you can use for each row in excel activity also.
Else if the values 1,2,3,4,5 are in an array, then you have to use for each activity. Then you will get one by one.
var1 =row("columnname ").tostring = 1,2,3,4,5
arrayvar=var1.split(","c)
arrayvar(0).tostring will give you first value or
use for each for arrayvar
I am getting wipro, modies and concentrixs but i need only wipro after doing some google search then i will take modies…
Hey @rohit_di
If you only want a single value, you will no need a ForEach!
If you know Wipro will be always coming at the first row, then please use the below…
mm.Rows(0).Item("Vendor Names").ToString
If you don’t know at which position Wipro comes, then you need to first filter by Filter Data Table
activity or you can use below method.
mm.AsEnumerable.Where(Function(row) row("Vendor Names").ToString.Equals("Wipro")). First().Item("Vendor Names").ToString
The above statement will help you fetch Wipro record from the table no matter at which position it is located
Hope this helps
Thanks
#nK
done thank you…
Cool @rohit_di