Excel automation rows and columns

hi all
i have data in an excel sheet of 10 columns…i have to pick desired column and keep it in another excel sheet at desired column
for example : excel 1 column A1 tobe copied to another excel2 at B8

—we can ADD DATACOLUMN ACTIVITY for this and also the INVOKE METHOD activity for pla u g at required position
—use excel application scope and pass the file path of first excel as input and use read range and get the output with a variable of type datatable named dt1
—again use another excel application scope and read range activity to get the datatable of aecojd excel with a variable named dt2

—now use a assign activity like
col_variable = dt1.Columns(“yourcolumnname”)
Where col_variable is a variable of type System.Data.DataColumn

—now use INVOKE METHOD with SetOrdinal method to place at desired position in dt2 datatable
With column index as input parameter which usually starts from 0 for first column

which can be written to excel with WRITE RANGE activity

Cheers @prasssaadd

Hi @prasssaadd

1.Use excel application scope pass path of excel.
2.Next use read range activity enter range which you want to select data create output data table variable.
3.And next use write range activity pass data table variable.


Kommi Jeevan.

hi @Palaniyappan
error is showing

Is the variable col_variable is of type system.data.datacolumn
We need to browse for that type in the variable type cheers @prasssaadd

ok i changed it next is invoke method …i never used this

I have attached an example of it buddy

Cheers @prasssaadd

again showing error

I hope we have met passed the parameter
In the property panel of this invoke method activity we have a property called Parameter where mention the parameter with IN type and int32 type with a value as column index position

Cheers @

Have we mentioned the col_variable along the target object
Cheers @prasssaadd

1 Like

The method Target object should be
I have also changed the example for your reference

Cheers @prasssaadd

anothr error

Hi ,
Here is the activities called “Copy ToClipboard” and “Past Clipboard”.

  • Using this activity “Copy ToClipboard”. You can copy data in in the excel.
  • Using this activity “Past Clipboard” . You can paste data any excel file.

Here is the activity link

I have uploaded the package in UiPath Go. Once published you can get it from Uipath go!. Until now you can download it Here


1 Like