I have a scenario, for example 2 columns are there in excel pr OR
the values coming from queue inpr 2, inorder=234
if row(“pr”).tostring=inpr and row(“OR”).tostring=inoeder
then write a some data in that cell in that row
column is Z
How to solve this one
I used for each loop in that output index given but its not working properly
@Gangadhar_Athili @THIRU_NANI @Palaniyappan
idx=DT.Asenumerable.Tolist.Findex(Function(r) r(col1).ToString=Str1 and r(col2).ToString=Str2)
Then Take write cell activity
In That range as “Z”+(idx+2).Tostring
Hey!
Try this:
Assign intCounter = 1
Inside the loop do like this
Take one if condition
row(“pr”).ToString.Trim.Equals(inpr) and row(“OR”).ToString.Trim.Equals(inorder)
In then block use write cell activity with the help of counter variable
Range: "E2:E"+(Counter+1).ToString
Next to write cell increment the counter
Assign intCounter = intCounter+1
Regards,
NaNi
try this to get index
idx =DT.AsEnumerable.Select(Function(r,i) If(r(“pr”).ToString.Equals(inpr)) And r(“OR”).ToString.Equals(inoeder),i,-1)).Where(Function(x) x>=0).ToList(0)
in the write cell “Z”+(idx+2).Tostring