I am facing difficulty in removing duplicate. I am having 30 columns in the excel sheet and if there is a duplicate in a specific column even if other columns are not matching rows should be deleted.
I have used Dt2.DefaultView.ToTable(True,“Column1”) which works to remove duplicates for Column1 as per my requirement but writes back only Column1, other 29 columns are not written back into the sheet
I have used Dt2.DefaultView.ToTable(True,“Column1”,“Column2”,“Column3” …“Column30”) which is removing duplicates for Column1 if the data across all columns are matching and writes back all 30 columns. This is not matching my requirement.
@balaji.nama
can you share the Excel or some sample data. Also give some details on what is the input and what is the expected output along the samples
I cannot share the data. But, can provide details on what am working on. Input is a report downloaded from a tool hence consists of 30 columns and 4000 rows. I need to remove duplicate from a specific column and delete all the duplicate rows irrespective if the data duplication across other 29 columns. But, unable to remove duplicates using the codes based in one column it considers all columns hence output is not correct.
Dt2.DefaultView.ToTable(True,“Column1”)
Referring to the below example -
Col1,col,col3
A,B,C
A,CD,s
CD,g,o
I have tried below 2 commands -
Using Assign activity - Dt2.DefaultView.ToTable(True,“Col1, col, col3”)
Output is coming as all 3 rows for me since col, col3 values are not matching for row 1 and row 2 even if Col1 value matches for row1 and row2 and output would be all 3 columns and all 3 rows.
Using Assign activity - Dt2.DefaultView.ToTable(True,“Col1”)
Output removes duplicates and only 2 rows are displayed but along with it only Col1 data is displayed