Rename column in datatable

Assign activity: yourDT.Columns(0).ColumnName = “New Column Name”

The 0 is the column index, which you have to set for whichever column you want to rename. 0-based index, so if you want to rename the third column you’d use Columns(2)

Or you can reference by column name…

yourDT.Columns(“Old Column Name”).ColumnName = “New Column Name”

14 Likes