Hi everyone,
I need a suggestion.
I’m working with an excel file and I should make an insertion of a new column. The new column should enhance it with the concatenation of three other fields read by the rows of the excel file.
this is the initial table below
data code1 code 2
18/05/2020 11 A3
18/05/2020 81 b6
18/05/2020 55 b6
18/05/2020 81 b6
Finally from the table I should delete all the rows that have duplicates, but not only the double rows but also the original ones.
To be clearer, I show you below how the table should become.
how can i delete both the duplicate line and the control line?
Is there a way to keep the right rows in one table and save duplicate rows in another table?
I hope you can help me and if you have any examples from which I can can take ideas please attach it
thanks
@vittoria Can you check if this is what you needed ? Check the Output Sheet in Excel File, Delete the Sheet and Run the Workflow. It Should generate the same sheet again. But this only works if you have only 3 Columns as Input not dynamic. RemoveDuplicates.zip (8.4 KB)
Thanks for your answer, but in reality I thought of something more dynamic also because in the description I put three columns as an example but in reality in my excel file I have almost twenty
so you are looking on a solution that aggregates all columns, right?
And duplicates are defined with the uniquness off all columns as well. Does mean for uniqness check all columns are used and compaired?
No I don’t have to aggregate all the columns.
I have about twenty columns in the excel file.
I have to create a new column in the excel sheet and value it with the concatenation of three values taken from other columns.
after adding this new column I have to check the duplicates
Hi @ppr,
I took the example you sent me and I changed a few things, but this select doesn’t work below
(From d In dtConcated.AsEnumerable
Group d By k = d (concat_column) Into grp = Group
Where grp.Count> 1 Select grp.toList) .SelectMany (Function (x) x) .toArray
I am attaching what I did, could you help me understand why the select doesn’t work?
thankscheck_duplicates.zip (10.1 KB)
@vittoria
I will have a look on it later. But in the meanhile ensure that the definition of input expected output is avaialble for me or share it here. Confidential data can reflected with sample data e.A1,B1… The intention of what to achieve has to be clear. Thanks