How to get the header which is in second Row


I want to take the second row as header and i want to take the Name,Age,DOB,Gender which is present with multiple columns.

for reference see the attached snapshot below.


Try reading excel from cell A2 and make sure add headers option is checked.

HI @Zeki_Berk_Gokkaya

I thought the same but if you see the column name all are same .So, it’ll throw an error (like Column name already exist) while reading the excel i think



How about the following? This renames each column name like “Country1_Name”. (9.6 KB)


@Gokul001 good catched the same col name scenario

we can do:

  • read range - A2 AddHeaders is unselected
  • then unifying the col names by following:

FixDuplicatedColNames.xaml (10.2 KB)


Try below steps

  1. Read Range – Outpur : outputDT And Range should be Range - A2:D2 and
    AddHeaders should be Checked

  2. Assign Activity

    arrOfHeaders (Type : Array of String) – (From dc In
    outputDT.Columns.Cast(Of DataColumn) Select dc.ColumnName).ToArray()

  3. Iterate on arrOfHeaders OR arrOfHeaders(0), arrOfHeaders(1),…

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.