Get column data from multiple excels by its column name


#1

Hi,
i am trying to merge data from these 3 excel files by its column names , Whereas,for example (name ,or employee name column data into one column )(col “NO” into one column )
please help me with the solution
Group H&S Employee Enrollment Form 15.01.2018.xlsx (18.2 KB)
GTL Movement Form_02.01.18.xlsx (43.5 KB)
New Hire Resignation 2016 April.xlsx (23.2 KB)


#2

@skrishna, From you excel select a datatable with only one column with following query,

dt.DefaultView.ToTable(false,"columnName").

Append Range/Merge Datatable to merge all sheets

Regards,
Dominic :slight_smile:


#3

you can build one data table and add the selected columns using add column to the final data table


#4

thanks, for the reply . but here the column name is changing from excel to excel ,(I.e., name in one excel and employee name in another excel ) so,whereas in the column name if i mention - “name” or "employee name " is not a valid column


#5

@skrishna, If the index of both the columns are same then go with index. Column0, Column1 and so on

Regards,
Dominic :slight_smile: