How to Copy entire Column(multiple columns) from Datatable



Hi Guys,

I have got an expression for copying entire column(single column). Please help me to copy entire column (multiple columns) from a datatable and paste the same in SAP.

expression - string.Join(Environment.NewLine,DataTable.AsEnumerable().[Select](Function(s) s.Field(of Double) (“Column1”)).toarray())

Please update the changes in the above expression as per my requirement.

Thanks in advance.


Hi there,

I think I understand you are wanting to store the entire column into string to be used to paste into SAP.

String.Join(System.Environment.NewLine,DataTable.AsEnumerable().Select(Function(s) s("Column1”).ToString).ToArray())

Then, you can use Set Clipboard or use the string directly into SAP.

To do multiple columns, you can assign the expression again but change the column name or use column index.

Here is what I used to test the expression: JoinColumn.xaml (5.5 KB)

Hope this helps. Regards!

How to concatenate two columns in datatable without looping and keep concatinated data in new column?

Thanks Clayton,

I too have used the same expression by changing the column names.

Thanks anyways for your support…