Copying one whole row of a Data Table

Hi there, I was looking for some answers in the internet but havent found anything yet.
By using read range activity I created a Data Table and want to copy the whole row (as you can in excel with ctrl+shift+down). I want to paste it in one SAP data field because it will recognize the structure of that data table and won’t put all values in that one field.

In other words: I want to avoid the robot to copy and paste values from excel to sap one by one.

Any tips? Thank you :slight_smile:

Welcome to uipath community
Would you like to paste from excel directly as a single row been copied
Would like to get a Datarow from a datatable and pass it as a value to the first field of the row line in SAP

For the first one use start process activity and pass the file path as input so that it will bring the excel sheet to the foreground
—then use a send hot key activity with key as ctrl+g and use a type into activity which enters the cell we want to start from for that row
Like mention as
“A1” + “[K(enter)]”
—This will enter the A1 cell and press enter but make sure that we haven’t enabled simulate type property in the type into activity instead we can enable send window message property

—Then use another send hot key and mention as ctrl+right which will select that row alone
—send hot key with key as ctrl+c
—now we can open SAP and use a send hot key with key ctrl+v


If we want to do the second method then
—use a assign activity like this
Arr_datarow = Yourdatatablename.Rows(rowindex).ItemArray
Where Arr_datarow is a variable of type array of objects
Then we can use pass that value to the first cell of SAP with normal type into activity by passing one by one with the array index value specified

Hope this would help you
Cheers @Victor_S

1 Like

Hi @Victor_S ,
Here I have shown you by screen shot that how to copy (to Clipboard) the whole row in excel and convert to datatable. (Using the BalaReva.Excel.Activities)


Output :

Sample : (19.5 KB)

Package link :



hello @Victor_S
If I understood you correctly… this is the button you are looking for…
after copying the column from excel (ctrl+shift+down) just hit this button in SAP

I am not sure about multiple column (cant test it now, dont have SAP) but it surely works for single column data I have tried it…


Hey, thanks for your herp. When I want to create the variable it says “1 dimensional string of objects cannot be coverted into interger”. I have barely knowledgeof VB so I dont know how to fix it. Can you help me?

may i know where we get this error @Victor_S

After creating the variable “Arr_datarow = Yourdatatablename.Rows(rowindex).ItemArray”

may i know what is the datatype of Arr_datarow and the variable rowindex.
also the value passed to rowindex