Excel_Multiple columns from one sheet into single row of another sheet


In one my project, i have to do this type.
Taking multiple columns from one excel sheet1 and that have to convert into first single box
below attached…Pls help with this
This is the Columns, i have

Have to do with rows, Pls help this



Taking column names from a Datatable

Assign :

String Array arr = (From col in dt.columns.cast(of system.data.datacolumn select Convert.ToString(col.columnName)).Toarray()

Join it to form a string

Assign :

String str = " ’ " +String.Join(" ‘,’ ", arr) + " ’ "

Finally use this string to write in excel

Dominic :slight_smile:

Taking column names from a Datatable?
From read range activity in excel?

@Sharanabasava, yes use read range and store it in a Datatable

Dominic :slight_smile:

Hi @Sharanabasava

While using Read range activity check add header property

If you check add header property it will take the first row as header.
If you uncheck add header property then datatable ll take default header from the sheet like (column1,column2,…)