Check the column contain some keyword

Hello, I don’t find a solution to split a sentence in a cell.

So, we have a few column, from a specific column (Fruits), I want to sort/filter the row into 3 different sheets following the keyword (Apple, Orange, Grapes)

Pls kindly support me with a xaml file and the solution. Thank you.

Thanks in advance.

1 Like

Hi
welcome to uipath community
yah of course its possible with FILTER DATATABLE ACTIVITY
or even With SELECT method
Fine
Hope these steps would help you resolve this
@
—use excel application scope activity and lass the file path as input
—use read range activity and get the output with a variable of type datatable named outdt
—use three assign activity like this
outdt1 = outdt.Select(“[Fruits]=‘Apple’ “)
outdt2 = outdt.Select(“[Fruits]=‘Orange’ “)
outdt3 = outdt.Select(“[Fruits]=‘Grapes’ “)
Where
outdt1,outdt2,outdt3 are datatable variables which are defined in the variable panel with default value as new system.data.datatable

—use three write range activity and pass the datatable one by one as datatable input and in sheet name mention the sheetname we need in each write range activity and make sure rhatbadd headers is enabled in the property panel of write range activity

That’s all you are done
Hope this would help you resolve this @f39b242a4f84ba555bd3
for more details on filter datatable activity

Cheers @f39b242a4f84ba555bd3

1 Like

@f39b242a4f84ba555bd3

Welcome to the UIPath Community.

  1. use Read Range activity to read the data from excel and will give you output as DataTable say ‘DT’

  2. Then use below expression to filter the data.

            DataTable appleDT = DT.Select("Fruits = 'Apple' ").CopyToDataTable
    

And same way try for other too also.

  1. And then use Write Range activtity to write into excel file and pass that DataTable as input to it.
2 Likes

this said to be in row. still working on it. anyways thank you for helping!

1 Like

No worries
here you go
its resolved
Fruits.zip (18.3 KB)

Cheers @f39b242a4f84ba555bd3

1 Like

Thank you for helping sir!

1 Like

no worries
cheers @f39b242a4f84ba555bd3

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