How to copy the filtered rows and paste the data in New excel file

Hi Team,

need to filter the data exceeds 55 from column W and filtered data will be paste in to new excel file using UiPath

Hi @Ramudu

Use Filter DataTable activity

Regards,

@Ramudu

Regards,

Hie @Ramudu hope this code help you to filter you data …
your input


Filter data on condition basis
A programming workflow involves assigning rows from an input data table to an output data table based on a condition that values in "Column1" are greater than 55. (Captioned by AI)
Note: dtoutput is also a datatable variable
finally your output

and if you want to include 55 also add = also
like this

then it will include 55 too

cheer Happy Automation

after filtering i want to paste the filtered data in to new excel file and delete the filtered data in current excel file using linq queries.

Pass the output of linq query to write range activity it will update the into new excel sheet.

For example
Input file have 50 rows
After filtering i have obly 25 rows.
So i need to add filtered 25 rows in same input sheet.

Need to delete remaining rows of data in input file. Kindly suggest with linq query.

  • Read Range
  • Filter Data Table
  • Write Range

Hey @Ramudu after filtering just use the write range activity and give the new sheet name and use delete sheet/clear sheet activity to clear the data from the filter sheet.
cheers Happy Automation

Hello @singh_sumit ,
I did same thing but here j have one problem.
The input file have template with different colours lo rows and columns.

If i use clear sheet activity then the colours also clearing. So i don’t want edit or change the template colours.

I want to remove the data present inthe excel sheet after filtering.
Need to be write the filtered data in a smar template kindly suggest.

Hi @Ramudu

Can you try the below

A filter dialog box is shown with advanced filter options configured to filter values greater than "55" using an "And" condition. (Captioned by AI)

Regards,

1 Like