Multiple string/keyword search comma separated form excel

Hi there,

I am having hard time solving an issue,
I am trying to take input (single or multiple both with comma separated) from user and search (searching this from on of the excel sheet column Description) and print the records based on input string.
While doing this i have to make sure of blank space and also i have to make sure if multiple keyword is typed(obviously be caring space) is working for example please refer to the attached screenshot
I have typed “elbow**,** wire rope**,** measuring tape” and these are three keywords.

right now my code is capable of giving output of single value

image (1.6 MB)

1 Like

@indrajit.shah, that is so simple; you just need to follow below steps-

  1. Convert this dialog input in an array and assign it to an array type of variable using - split(InputString, ",")
  2. Open excel file using excel application scope
  3. Read data using read range activity
  4. Use filter data table activity and apply a filter on Description Column and pass item.trim (trim will remove spaces)
  5. Check for the filter data table if any value returned or not using If condition > filtereddatable.rows.count>0
  6. If the above condition returns True then you can print filtered row.


thank you @vikaskulhari, do you mind giving an small example ?? i had attached the zip file attached with my post above it has main file as well as demo excel files.

@indrajit.shah, Please try with steps I shared above if you face any issues please let me know.

you were almost done
instead of this IF condition we can mention this condition to take multiple inputs

IDescription.ToString.Contains(“”+in_Keyword.ToUpper+“”) And lResponse = vResponse

IF(in_Keyword.ToString.ToUpper.Contains(“,”),IF(Split(in_Keyword.ToString.ToUpper,“,”).Contains(IDescription.ToString),True,False),in_Keyword.ToString.ToUpper.Contains(IDescription.ToString)) AND lResponse.ToString.Equals(vResponse.ToString)

Cheers @indrajit.shah

@vikaskulhari can you explain a bit more, i am having hard time understating the 1st step.

did you get time to see my main file?

I have a question, I am building an automation where i have to apply mutiple invoices against a single receipt number. I have an excel file, for each receipt number , there are multiple invoices in the same cell separated by space. How should i let it read the invoices one after another for that particular row and once entered in Oracle move to second row. The number of invoices varies.

1 Like

Welcome to uipath community

Yah we can fetch that particular row cell value which has the multiple invoice values with space in between
Store that in a variable of type string named strinput

Now split that value with space as delimiter and save that in a array

Like this in a assign activity
arr_value = Split(strinput,” “)

You can now iterate through each invoice values with a FOR EACH activity and then go for the next row of the datatable

So it like
—Read range
—for each row
—assign (to get array variable)
—for each

It goes like a loop

Cheers @Surabhi_Agarwal

1 Like

Thanks @Palaniyappan I am giving it a shot…i will let you know if runs fine.

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