Assign varibles until cell i empty with a counter



Each month 10% of all clients applications for funds will be randomly picked for inspektion. I have solved this by craping data from our buinessapp and done a radom pick where the clients personal numbers are added to the H colum in a excel spead sheet. Now I need to match each cell with reponsable personal by using the variable from each cell and type into the buiness app for a lookup to send them a message to contact their client.

I need some help. So the senario is that I have some data in colum H in excel where I need to assign a variable for each cell. This variable will be used later in the flow to be entered into our business app.

The problem is that I dont know how many cells in H has value as it changes every month (10%, but maximum 20).
The number of times I need to preform the lookup action in the application depends on how many cells there is (one cell = one action). So I somehow first need to get a variable for each cell that has a value in colum H and then tell UiPath how many varibles (cells) where created and run the actions in the business application equal amount of times.

I am really lost in this and would really like some help. Working withh excel and uipath is new to me. Thanks in advance.

You can use the Filter Data Table activity to get all the rows where the cell in column H is not empty:


Column7 is for column H (Column0 is for column A, Column1 is for column B, etc). Replace it with the column name instead if your table has headers.

Great thanks, that will help when collecting the data from H.
Do you have any idea how I then perform a unique action on each cell to solve my problem? What method do you suggest?

Many Thanks

You can use the For Each Row activity to loop through the new filtered data table.

I did try to use this but I cant seem to get it to work.

  1. I start with an Excel application to point to my excel file.
  2. Filter Data Table Activity - like you advise with the OutputDataTable called newDT.
  3. Then im lost…

Should I be using an array of strings and if so, how do I assign my entire datatable to an array of stings?

See the attached workflow for an example. It reads an excel-file, filter out the rows where column H cells are not empty and then print the values of those cells to the Output panel.

ExcelTest.xaml (9.0 KB)

Thank you very much! I managed to get it working!

1 Like

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