Excel_Multiple columns from one sheet into single row of another sheet

Hi,

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
Col

Have to do with rows, Pls help this

Regards
Sharan

@Sharanabasava,

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

Regards,
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

Regards,
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,…)

Regards,
Arivu