Hi
I want to remove duplicate rows by comparing the rows of the same column. If the content of row1 is ma to row 2 then delete row1 and so on till the end of selected rows.
example
column1
abc
abc
def
abc
You could do it by using by the Remove Duplicate Rows activity Or using the following code: DataTable distinctTable = dtRows.DefaultView.ToTable(true, "column1");
Atul_Rai is right. But in the UiPath also is having the activity to remove the duplicates by “Remove duplicate rows” activity. Below you can take an overview with the example.
Hi @acaciomelo
The code “DataTable distinctTable = dtRows.DefaultView.ToTable(true, “column1”);” will give me distinct values but I want to remove only the row which are cosecutive and keep 1 row.
example
I have a list of program to be broadcast in a day. A program will have repeat telecast also. So i want to remove the program name if they appear twice or trice consecutive only.
Like
program name
drama -1
drama -1
movie -1
drama-1
drama-2
output
drama-1
movie-1
drama-1
drama-2
I hope this time I am much clear with the problem statement.
Thanks
Well, in this case you could iterate the rows and check if the current value is not equal to the previous one. If they are different, then you may apply the value, otherwise you may continue the loop.