How to find the duplicate column name

how to find the duplicate column name in dynamically

1 Like

–hope these steps could help you resolve this
–use a excel application scope and pass the file path as input
–get the output with a variable of type datatable using READ RANGE activity and make sure that the ADD HEADERS property is not checked
–now use assign activity like this
arr_outcolumnname = (From dc In dt.Columns.Cast(Of DataColumn)
Select dc.ColumnName).ToArray()

out_list = arr_outcolumnname.GroupBy(Function(x) x).Where(Function(x) x.Count > 1).Select(Function(x) x.Key).ToList()
where out_list is a variable of type system.collections.generic.list(string)
which will have the duplicate columnname

Cheers @vivekktr


It’s Strange… You could’t Create Duplicate column Name in data table

how to search dynamically

send me a sample xml

where arr_outcolumnname is provided the string as column o
then we are using outlist

then how to identify duplicate column and rename