I think that in your first if you should replace:
columnHeadersArray.Contains(column.ToString)
into:
columnHeadersArray.Contains(column.ColumnName.ToString)
In the assign, you should:
remove : colname = xxx
change into column.ColumnName = “Week Ending”
Not sure if this works, still waiting for my robot to be available
Either you rename only the first column (then you should add break activity after renaming), or you add an index.tostring after week ending (so that you have at the first column week ending 1, week ending 2, etc Bold.xaml (13.1 KB)
@Hiba_B Assign error has been fixed.
But It doesnt change the column names in the data table.
I want to change only the columns that have default column names(column1, column2 etc) not all columns.