Hi Friends,
I have two columns in excel.i need my output as below:
i need to filter duplicate records from excel based on column’address’.
INPUT
ORDERNO. Street Address(A)
11661297 8750 FRESNEL
11661297 694-6 Alem Zona 1 Campana, Pica
11583987 6 Rodovia
11654839 5123 JUAN RAMÓN ESTOMBA
11654839 5123 JUAN RAMÓN ESTOMBA
11551462 841 CALLE FELIX DE AZARA
11551462 419 AVENIDA COLON
11551462 419 AVENIDA COLON
11551462 419 AVENIDA COLON
OUTPUT:
ORDERNO. Street Address(A)
11654839 5123 JUAN RAMÓN ESTOMBA
11654839 5123 JUAN RAMÓN ESTOMBA
Note: we need to pick order numbers which have same addresses.
Thanks,
Chandini.
lakshman
(Ganta lakshman)
December 15, 2019, 11:00am
2
@chandini_dudekula
Welcome to our UiPath Community.
use Read Range activity to read the data from excel file and will give you output as DataTable and say ‘inputDT’
And then try below expression.
duplicateDT = (From p in dt.Select() where( From q in dt.Select() where q("Street Address(A)").Equals(p("Street Address(A)")) Select q).ToArray.Count>1 Select p).ToArray.CopyToDataTable()
Hi
Welcome to UiPath community
Kindly have a view on this thread
@SHAISTA
You have to replace dt with your datatable Variable and assign the result to one more datatable variable**
(From p in dt.Select()
where( From q in dt.Select()
where string.Join(“,”,q.ItemArray).Equals(string.Join(“,”,p.ItemArray))
Select q).ToArray.Count>1
Select p).ToArray.CopyToDataTable
Regards
Mahesh
Cheers @chandini_dudekula
Hi lakshmn, i tried the same way,but im getting below error
lakshman
(Ganta lakshman)
December 15, 2019, 12:31pm
5
@chandini_dudekula
Please follow below mentioned steps to resolve this error.
When trying to use the AsEnumerable() method on a data table, i receive a error stating that AsEnumerable is not a member of ‘System.Data.Datatable’. I’ve seen someone else with this problem and their solution was to use temporary data table activities in their project to load in the System.Data.DataSetExtension library. However this has not worked for me. Any help would be greatly appreciated.
Thank you.
@lakshman
my output should be
ORDERNO. Street Address(A)
11654839 5123 JUAN RAMÓN ESTOMBA
11654839 5123 JUAN RAMÓN ESTOMBA
but i’m getting output as
ORDERNO. Street Address(A)
11654839 5123 JUAN RAMÓN ESTOMBA
11654839 5123 JUAN RAMÓN ESTOMBA
11551462 419 AVENIDA COLON
11551462 419 AVENIDA COLON
11551462 419 AVENIDA COLON
here we should ignore the order 11551462 where all of its addresses are not same.
1 Like
Did this thread help us in this
@SHAISTA
You have to replace dt with your datatable Variable and assign the result to one more datatable variable**
(From p in dt.Select()
where( From q in dt.Select()
where string.Join(“,”,q.ItemArray).Equals(string.Join(“,”,p.ItemArray))
Select q).ToArray.Count>1
Select p).ToArray.CopyToDataTable
Regards
Mahesh
Cheers @
@Palaniyappan
i’m not getting correct output.
My desired output should be:
11654839 5123 JUAN RAMÓN ESTOMBA
11654839 5123 JUAN RAMÓN ESTOMBA
but i’m getting output as:
ORDERNO. Street Address(A)
11654839 5123 JUAN RAMÓN ESTOMBA
11654839 5123 JUAN RAMÓN ESTOMBA
11551462 419 AVENIDA COLON
11551462 419 AVENIDA COLON
11551462 419 AVENIDA COLON
But I hope your requirement is met
Cheers @chandini_dudekula
lakshman
(Ganta lakshman)
December 15, 2019, 3:36pm
10
@chandini_dudekula
This is what you asked right. You said want to find all duplicate records from the input data.
If you want to find particular Order No. duplicate records then try below expression.
orderDuplicateDT = inputDT.Select("ORDERNO. = '11654839'").CopyToDataTable