LinQ query or any other solution for converting first row of datatable as a haeder

@Dummy ,

If following a Datatable Approach, an alternate also would be to rename using a For Each Loop like shown below :

  1. 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.

  1. Next, we use a For Each Activity and Iterate through the Current Column Names of the Datatable. We also assign an Index value to For Each Activity. Inside For Each we use an Assign Activity and rename the Column using rowValues(i) where i is 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.