Read values in excel and then write the value in website associated to one person

Hello to everyone,
I’m trying to automate a process that consist in read the values in a column in excel file and write them in a web portal in order to make recharge to employees of the company where i actually work.
In particular:
the robot should read the column “giorni” in the excel file
Schermata 2022-01-27 alle 10.42.19

Then go to a website and in this page, It should write this value in column “N° buoni”
(For example; Ivano in excel file has value 18, so the robot should write 18 in the first row Ivano of the website portal)

Anyone could help me?
Tks guys

Hi @daniele.giunta94 ,

Please follow below steps to achieve this requirement.

  1. Use application/browser activity to launch and use click activity to navigate to the page you mentioned din the post.

  2. Use work book read range to get the excel data into data table.

  3. Use for each row loop and assign the data table output from the above step.

  4. Use the following expression to get the dipendente and giorni values row by row.

dipendente = CurrentRow(“dipendente”).tostring
giorni = CurrentRow(“giorni”).tostring

  1. if you are having the same values between excel and website. use type into activity and indicate the text box related to N° buoni and get the selectors make the selctors dynamic and enter the value with the following expression CurrentRow(“giorni”).tostring

  2. OR if the same row pattern is not folowing i mean dependant information in the excel and website jumbled go for Anchor base activity for find element indicate the label name of the dependant (use dynamic selectors) and right side use type into enter the girni value under the field N° buoni .

Please use the above steps and explore on the dynamic selector area to achieve this requirement. i hope it might helpful to your requirement. thanks.

have a look below on how with dynamic selectors and integrated anchor within the selector the corresponding textfield can be targeted

1 Like

hi @kirankumar.mahanthi1, tks for your answer but i’m a beginner and despite i have read the article that you advise me, I don’t figure out how can i set the dynamic selector in this case.
I attached the printscreen of the selector

I set the expression CurrentRow(“giorni”).tostring in ‘buonoDaCopiare’, but maybe it’s wrong

Could you explain me how can i set correctly this selector?
I also attached the sequence
ForEachRowinDataTable.xaml (7.0 KB)

PS:the value in excel and the web are the same, but the row order is different. I tried to use anchor base but when i use find element activity the type into activity disappear. You can try in the sequence that i attached.


Hi @daniele.giunta94 ,

i have an idea. Can we make row column attribute dynamic for the selector like below and try instead of anchor base and see if it is entering correct values in those text boxes. attaching code snippet for your reference. i hope it might helpful to your requirement. thanks.

ForEachRowinDataTableUpdated.xaml (7.9 KB)

@kirankumar.mahanthi1 I set the selector with the code:

And this is the new sequence:

the problem is that it does not write the value in the box below but they are olny in the first box. In fact, in the attached printscreen you will see that if I delete manually it writes the other values ​​it reads in the table :

At moment the main problem is that not write values in all boxes


ok. i want to know the difference between the selectors for first and second text box i mean what is the tableRow and tableCol attributes for the first two text fields.

And also check the feasibility with the hot keys if we click multiple time tabs in the UI is going to the next text filed. please try and let us know. thanks.

Selector first box:

Selector second box:

The only method to go to the next box is click two time the button “tab”

I also managed to create the activity anchor base correctly as you can see

@kirankumar.mahanthi1 do you have some notice?
I’m waiting your advice :pray:t2:

Hi @daniele.giunta94 ,

Based on the screenshot for the first and second text field both have same selectors. First time I am seeing like this. Both should have some difference atleast under tablRow since both have different rows under that Ui table.

Currently I have idea like use for each row loop and use just type into enter the value below use send hot key and enter two tabs to go to the next field and continue the loop enter for next field. Thanks.

@kirankumar.mahanthi1 I was wrong, I sent the same screen twice. I send the correct screens.
table row changes !! what can i set to change the row?

first box:

Second box:


Now with the screenshots tableRow is changing. The previous solution with the dynamic selectors should work with incrementing counter not sure why not entering in the first text field only. Could you check css selector how it is changing for both text fields. Thanks

To find the correct box where type values, it is possible to use a dynamic selector on the anchor (the employee) by using a variable string with the expression CurrentRow(“dipendente”).ToString ?
Could i make dynamic the aaname o innertex where is showed the name of employee like in this screen?

Hi @ppr could you read the discussion with @kirankumar.mahanthi1 who is trying to help me in order to figure out what I’m doing wrong ?
I don’t manage to find a solution :pensive:

hi @daniele.giunta94
I was following the discussion but will have soon a closer look on it. Details asked by @kirankumar.mahanthi1 are very helpfully and needed.

Lets stay tuned on it

@kirankumar.mahanthi1 @ppr, I’m happy to tell you that I solved the problem by replacing the anchor aaname with the variable “dependent” that contains the expression CurrentRow (“dependent”). ToString (it work also if the selector is not validated)
screen of selector attached:

Now, i have two las problem:

  1. in the file excel i have also a column “company” and i want consider only values of company1 ant not values of company2

  2. As you can see, when the value “giorni” is written in the web page there is the 0 and this create a problem because the value is 18 but in the web page is written 180 (column n°buoni)

How can i remove the 0?

TKS guys

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