Concatenate Column

activities

#1

HI All

I have data table extract from SAP table to xlsx format.
I would like to create an unique value in column “I”, which mine row data is around 200+ items.
Basically, the unique value is Concatenate of column B,C,D,E so I can perform vlookup with other excel.
Anyone has any ideas of how to concatenate column for all row in my data table, it great if the Column “I” can paste with value only.

Thank you


#2

Hi @ChongMing,

Use this code to get unique value from the table based on the column.

datatablename.DefaultView.ToTable(true, "B","C","D","E")

Use the below code to get all the row with concatenate all the column values in to superate column.

(from row in dtname.select() select row,string.join(",",row.itemarray)). CopyToDatatable()

Regards,
Arivu


#3

Is this supposed to be helpful?
Firstly “Use the below code to get all the row with concatenate all the column values in to superate column.” is hardly correct English.
Secondly, you just posted code. Nothing else. “Use this code”? Use it where how and when? Obviously this is C# code but where is he/are we supposed to insert it?

KR