Building a condition to check if current row and next row is the same

hello,

i am using studiox 2020.10.2 . I want to build a condition to check for each excel row if current row and next row value is the same. how can i do that and it will work inside the for each excel row module how it would react when its the last row and there is nothing as next row ?

1 Like

Hello @aayc , By using while condition it possible. Look the .Xaml , it may helps you
Excel_NextRow.zip (77.4 KB)

Happy Automation

Regards,
Gokul Jai

@Gokul_Jayakumar thanks for helping but i am having an error while opening it.


@aayc
Open it in Studio instead of StudioX

i-i cant. i would like to but i cannot switch between studio and studiox, company did restrict it for some reason that i dont know. thats why i am stuck and especially wrote down that i am using studiox and its version

@aayc , Cool… I will send screen shots, It may helpo you

image


If any doubt on above attached screenshots, feel free to ask me.

Regards,
Gokul Jai

thanks i will look into those

@aayc

  1. While loop condition Count<(DTInput.Rows.Count-1)
    where count start with “0”. Variable type is int32
    Count=0, Place it above the loop
    Dtinput is read data fromexcel

  2. If condition DTInput.Rows(Count)(“ColumnName”).ToString=DTInput.Rows(Count+1)(“ColumnName”).ToString
    If current row equals to next row, else current row not equals to next row

  3. within loop incerement the count
    Count=Count+1