How to read data from Excel then paste it on website correctly?

Hello Everyone !!

I need to collect the data from Excel & then paste it on the website using web elements (xpath) & then submit that on the website.
But I’m stuck, its able to copy 1 excel element only. I tried using for each loop filters also, am I doing it correctly? Please show me a step by step way if possible as its a very small task but due to less resources I’m not able to read the data one by one. I have attached excel & project screenshots of what I’m doing so please correct me.

Hi @pankaj858, you should use two loops in this case and an index in the second loop to point to the correct element.
Also, the loops have to be nested inside the Open website action.

You can see a similar sample recording in this post Get Value from For loop using excel and passing value to Xpath

1 Like

The issue is it keeps repeating the same values on each web element why?

for example just check my excel sheet photo attached above & then see this new resulted screenshot …it is pasting the same values again n again , I want it to be different on each of the web element

@pankaj858 You should use different filters and variables in the Loops and in the Web element actions.

First web element

Second web element

1 Like

Ok this way I guess I already tried, but if we have 1000s of entries, do we still need to use for each everytime? dont you think it will make the project more lengthier?, do you have any shortcuts ? suggest me a simple way of doing this.

Its just copying the data from excel & pasting it using the web elements, short & simple task it sounds but why a lengthier way to use?


You could try this approach:

save cell values in each row to string variables

and insert the value from them in web elements

1 Like

EXCELLENT WORK , Now I’m unable to scroll xpath elements, how we do it?