@Dummy ,
If following a Datatable Approach, an alternate also would be to rename using a For Each Loop like shown below :
- We Read the First row values from the Datatable using below Expression :
rowValues = DT.Rows(0).ItemArray.Select(Function(x)x.ToString).ToArray
Here, DT is the input Datatable, rowValues is a variable of type Array of String.
- Next, we use a
For EachActivity and Iterate through the Current Column Names of the Datatable. We also assign an Index value toFor EachActivity. InsideFor Eachwe use anAssignActivity and rename the Column usingrowValues(i)whereiis the iterative number or index of each iteration.
To get the Column Names from Datatable :
DT.Columns.Cast(Of System.Data.DataColumn).Select(Function(x)x.columnName).ToArray
Visuals :
Let us know if you were able to find a successful method from the suggested methods.
