Copying specific rows from one sheet to other

hi all,
how to copy specific rows from one excel sheet to other excel by using UiPath
Thanks,
Anjani Priya

You can use copy paste Range Activity to copy and paste a specific range/rows from one sheet to another.
Attaching documentation below :
https://docs.uipath.com/activities/other/latest/productivity/excel-copy-paste-range

how can i copy at a time multiple rows from one sheet to other

Hi @anjani_priya

Follow these steps

Sequence
ā”œā”€ā”€ Excel Application Scope (Source Excel)
|   ā”œā”€ā”€ Read Range (Read data into DataTable)
|   ā”œā”€ā”€ Filter DataTable (Filter rows based on criteria)
|   | 
ā”œā”€ā”€ Assign (Create a new DataTable for filtered rows)
| 
ā”œā”€ā”€ For Each Row (Iterate through filtered rows)
|   ā”œā”€ā”€ Add Data Row (Add each row to the new DataTable)
|
ā”œā”€ā”€ Excel Application Scope (Destination Excel)
|   ā”œā”€ā”€ Write Range (Write the new DataTable to the destination sheet)
|
ā””ā”€ā”€ (Optional) Save and Close Destination Excel File

Remember to configure all activities with the appropriate file paths, sheet names, and any other parameters relevant to your specific Excel files and requirements.

1 Like

There can be multiple options, as said either you can use copy paste range if you know the range in excel file.
Or you can add all the rows you want to copy into a separate datatable and write that data table into the excel sheet, you can add all your required rows into a second datatable and write that datatable.

Yes @anjani_priya ,

Copy/Paste range you can use if you have consecutive rows to paste to another sheet, but if you are require to different rows (different index) you can filter based on some columns and write the resultant datatable to destination sheet.

Hi @anjani_priya

Welcome to Community!!

Use Copy/Paste Range activity

Regards,

I want to copy from row and second row in one sheet,first row and third row in another sheet likewise i want to copy from main sheet to other sheets.

What is the condition which identifies the rows to be copied?

Hi @anjani_priya

You can use the Copy\paste range activity to copy the specific range of rows from one sheet and paste it in the another sheet.

Or

You can use the read range workbook activity and specify the range in the range field and the output is in Datatable.
After that use write range workbook activity to write the Datatable to another excel sheet.

Hope it helps!!

The task is header row and first row,header row and second row likewise consecutive rows i have to copy from one sheet to other sheets. How to do this activity.

can you please send the code

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