I want to remove row that includes duplicated cell value, in datatable

Hello.

name color
apple red
apple red
apple red
grape blue
grape blue
blueberry blue

to

name color
apple red
grape blue
blueberry blue

What activity or vb term should I have to use?
please let me know.

@hoseongwon

You can try using this in assign…dt is the datatble

dt = dt.AsEnumerable.Distinct.CopyToDatatable

Or can use as below

dt = dt.DefaultView.ToTable(True,"Name","Color")

cheers

Hey @hoseongwon ,

Try,
OutputDT = InputDT.DefaultView.ToTable(true,“name”,“color”)

Regards,

dt.defaultview worked Thank you so much!

1 Like

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