Duplicate columns in excel

I have many duplicate columns in excel sheet. how to rename the duplicate columns.

example:
Price, Total, Price, total, amount, fixedprice, amount.

Rename as

Price, Total, Price1, Total1, amount, fixedprice, amount1,

Hi,

Is the column position is fixed in your table ?

If it is,
Then suppose for Price - Column position is 2.
dt_Table.Column(2).ColumnName = “Price1”.

Similarly you can do for others .

Hope this helps you.

Thanks and regards
Sahil Garg

@Arjun_Reddy
Have a look here:
FixDuplicatedColNames.xaml (9.7 KB)

  • processing datatable’s first row
  • Applying Propercase to the found values
  • Removes spaces between word tokens
  • adds a counter if generated column names occurs more often then 1 time
  • renames datatable column names with generated new Column names
  • removes datatable’ first row

Let us know your feedback