Getting duplicate entry in excel using Build Data Table activity

Hi,

I am getting duplicate entry in excel using Build Data Table activity iwhen reading data from a website.

can anyone help here.
what the issue
attaching the xaml filenew.xaml (21.0 KB)

Hi
Build datatable activity is generally used to create a new datatable either with or without data in it
Would you like to remove the duplicates from the datatable built
If so we got REMOVE DUPLICATE ROWS ACTIVITY

Cheers @Abhinavpandey

Hi @Palaniyappan

Check this

Get the distinct values by using
dt2=dt1.DefaultView.ToTable(True)

Run for each row for datatable dt

in if condition
(From p in dt2.Select()
where string.Join(“,”,p.ItemArray).Equals(string.join(“,”,row.ItemArray)
Select p).ToList.Count>0

then Assign row(“Flag”)=“flag”

Thanks
Ashwin S

Try placing Add Data Row after the click Generate button activity so the bot exits the page and won’t have the chance to save the previous values twice.

image

if there’s a big chance that the source values are repeating, you can use Remove Duplicate Rows before writing the CSV file. You can also use Lookup Data Table or Select query to check that the row doesn’t exist before adding it. For the number of rows, you can also use while dataTable.Rows.Count<=targetNoOfRows.

Tried That , What still no difference.
Adding the screenshots.

image

Move Add Data Row after this activity.

Or just use this updated xaml. new.xaml (20.3 KB)

Thanks Man .

Its working fine . That Generate Click after add data row plus 3 sec delay . worked :slight_smile:

Welcome @Abhinavpandey Glad to be of help.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.