Read range how to output specific values to online forms?

Typical HF daily order.xlsx (25.3 KB)
So my school’s project requires me to use read range to read 2 excel files (first file 1 sheet, 2nd file is the one i uploaded, 5 sheets) and fill up 6 identical forms.
But how can i output the specific values of order number, name , email and postal code? I only know get row item but they are not in the same row and. And i need everything under Qty too. how do i get all these and fill in the form and loop this process for all sheets? Im very new to UIpath , posted similar question before but i didnt manage to figure out, please use very simple language thanks so much.

1 Like

Hi @Lucius_L ,

  1. First to get the order number, name , email and postal code you can use read cell instead of read range. As the cell numbers in excel are constant given them and get the values
  2. To get whole quantity value use read range with range as “A13”(as per sheet provided) this will give you all the data in a datatable make sure to check the add columns check box in properties.
  3. Now to get the sum of quantity . say the datatable is in a variable dt then Enumerable.Sum(dt.AsEnumerable.Select(function(row) Cint(row(“Qty”)))) will give you the sum of quantity.

This is for one sheet. Add a for loop and in for loop change type argument to String and give your sheets names as {“Sheet1”,“Sheet2”,…so on} and the loop will run for all sheets. CurrentItem/Item from the for loop can be given as a variable to sheetname in the read cell/read range to change the sheet name and loop through all sheets

cheers

1 Like

Hi @Anil_G ,
I am working on the same project as him so,

  1. after read range “A13”, i add a for each row in data table, and i add get row item “Qty” inside.
    The problem is, when i try to fill into the form, variable for “Qty” can only output 24, which is the last row for qty

@Lucius_L are you doing qns 4 and 6?, me too, please provide some help because the instruction is very unclear.

  1. did you successfully use read range activity to read the name, email… if yes, howwwww
  2. im also very confuse with the get row item thing, you manage to do it for the Qty part?
  3. how to loop this for qns 6 !!!

Really spent hours doing it but still cannot, lecturer didnt provide any help and you are the only module mate i found here. Please stay in touch if possible

Hi @ragingdragon

Not sure why you are getting only last row. but i would say first add break points before and after the activities and from local panel check the values in Datatable if they are as expected as the first step

cheers

@Anil_G
hhh
rescue

so after i read cell and read range, i did these, my teacher said that after get row item, what i type in is only the last row value(24).
how can i get it to read each row and type into the form, “tab” and type in the next row value.
for example, first row is 2, second row is 4, it can type into the form as 2, “tab” and 4

Hi @Lucius_L

Hi @ragingdragon

So for that please move your type into into the for lloop right after the get row item where you are getting the data. I beleive you are using it outside the loop

And in type into if you want only quantity then qtyvariable + k[tab]

Cheers

1 Like

thank you very much sir, i didnt get the concept of the for each row activity at first, it works well now!!! :grinning: :grinning:

Hi @ragingdragon

Good to know…

@Lucius_L if you got your answer then please close the with a solution so that orhers can get some help

Cheers

hi sir, im trying to loop multiple sheet this time, what should the sheet name be for read range if i place it inside a for loop?

Hi @ragingdragon

You nedd to get the sheet nams which will be a list pass that to for loop and change type argumnet to string use currentiem which will have the sheetname.

And please create separate thread so that each question will have related messages only.

Cheers