Setting Data Table to Clipboard

When i set a Data table to clipboard it is only setting the first row.

i have tried dtEKKN.Tostring and dtEkkn.Columns(0).ToString. iv tried few others also but not getting expected results. im not sure its possible or should i use a different approach.

i have to paste into a field in ERP

Thank you to all for your time

@Waterfowl_Waterfowl_hunte

Use Output Datatable activity ,Store the datatable in a string
Pass the string to “Set to clipboard activity”

1 Like

@Waterfowl_Waterfowl_hunte,

If you are planning to paste these copied POs to SAP screen, I would suggest to copy the data from Excel file instead of reading it to Datatable and then set to clipboard.

Instead use Copy/Paste Range activity to copy

Thanks,
Ashok :slight_smile:

1 Like

Thank you this worked perfect!

1 Like

Hi @Waterfowl_Waterfowl_hunte

You can use the LINQ expression to store all the values in a column in datatable.

Use the below expression in assign expression,

- Assign -> CopyData = String.Join(Environment.Newline, dtEKKN.asenumerable.select(Function(row) row("Purchase Order).toString).tolist())

Then pass the CopyData variable to the Copy to Clipboard activity.

Hope it helps!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.