Can anyone please guide me of how to check if certain value appears twice in excel.
I had used for each loop to check the value has occurred more than once or not,But if the excel has more records it takes more time to check the value.
Is there any short way to check the value is occurred more than once or not?.
–if we want to validate for each row with each value whether it has repeated or not, then we need to go with for each row loop as you did
–but if we want to validate as a whole with total row count difference with and withou duplicates then we can use REMOVE DUPLICATE ROWS where pass the datatable variable as input and mention the same datatable variable name as output
–now use a assign activity before and after this REMOVE DUPLICATE ROWS activity
like this yourdatatable.Rows.Count.ToString
which will give us the difference as a whole term
hope this would help you
Please try to use the below step if it is relevant to your requirement.
Read the data and stored in one datatable variable of DT.
Then take the distinct value from the above datatable for that you need to create new Variable by using assisgn activity.
Followed by for each loop and if ((row1(“Columnname”).ToString.Contains(row2(“Columnname”).ToString)) to get a repeated value.
Mohanraj.SCanteen.zip (40.2 KB)
@sanju_RPA once you have stored the data in a data table then get the count of your column and group by the same column.
The xaml file that you posted has missing activity when I tried to open it. Can you repost the file? Thank you!
Thank you, Mohanraj.S !