How to get unique values from a column on excel file to an array

need to get some names from a column but no names should be repeated.

@Sarath_Babu_Sheela

Welcome to the community

Please try this

Dt.AsEnumerable.Select(function(x) x("ColName").ToString).Distinct.ToArray()

Cheers

@Sarath_Babu_Sheela

Welcome to forums

Declare an string array variables let’s say arrNames

Now use assign as below
arrNames = YourDatatable.AsEnumerable.Select(function(x) x(“ColName”).ToString).Distinct.ToArray()

Hope this will help you

Thanks,
Srini