Hello RPA lovers,
How to compare two consecutive rows of the same Datatable and if they are the same remove the second one?
I don’t have names assigned to datatable headers
I hope some experts can help me =D
Hello RPA lovers,
How to compare two consecutive rows of the same Datatable and if they are the same remove the second one?
I don’t have names assigned to datatable headers
I hope some experts can help me =D
@Asghany You can use “Remove Duplicates Range” activity to remove all the duplicates in the Data Table. You can use Remove Duplicates too.
Hi @Asghany
Use an if condition
Row(“columnname”).ToString.equals(row(“columnname”)
Use remove data row activity
Thanks
Ashwin.S
@supermanPunch @MartianxSpace @AshwinS2
Thank you for your quick answers.
Remove duplicates will not work, since I want to remove accordingly to one column specification and not the all row.
Row(“columnname”).ToString.equals(row(“columnname”) will also not work because I don’t have headers names on my columns
You are talking about this right? Row(“columnname”).ToString.equals(row(“columnname”)
But row value will be the same.
I want to compare the row(0) wit row+1(0)
@Asghany If No Headers are available , then when you read the File , Uncheck Add Headers Option, in that way by default you will get ‘Column0’,‘Column1’,… as the headers
Like this?
dt_Sorted_2.AsEnumerable().GroupBy(Function(a) a.Field(Of String)(‘Column1’)).Select(Function(b) b.First).CopyToDataTable()
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.