Filter Specific Column then copy first row and filtered column

Hi, I will like to find out how I can do these steps in Uipath:
image
test.xlsx (9.6 KB)

  1. Filter for apple first
  2. Copy the the the first row which is apple and 3 only for data entry.
  3. Copy the filtered column of the buyers (Paul, James and Charlie) who bought the apples paste it into clipboard.

Appreciate any advice on the activities to be used.

Thank you.

Hi
Hope we have the datatable obtained from Excel with Read Range activity, named dt
—now use a assign activity and mention like this
dt = dt.Select(“[Type] = ‘Apple’ AND [Serial] = ‘3’ AND [Buyer] = ‘Paul’ OR [Buyer] = ‘Charlie’ OR [Buyer] = ‘James’ “).CopyToDatatable()

Now the datatable will have only the data that matches your condition
Cheers @junnieset

@Palaniyappan I got an error. How do i solve this?

To elaborate, the data in the row (apple and 3) I will have to do data entry somewhere and then I will copy the column filtered which is Paul, Charlie and James into a clipboard.

Thank you,

1 Like

@junnieset

Make sure dt variable should be of type System.Data.DataTable but not workbook type. Please change it and then try again once.

Fine
You were almost done
The variable dt should be obtained from READ RANGE ACTIVITY and not from EXCEL APPLICATION SCOPE
So that the datatype of dt variable will be SYSTEM.DATA.DATATABLE
I hope you have got the variable from EXCEL APPLICATION SCOPE kindly delete that and get from READ RANGE ACTIVITY

cheers @junnieset