How to open all excel files in a folder and read data from specific cells

Hi i am new in UIPath and i am trying to open let say 5 excel files in a folder and for each folder i want to use data from cell A5 as username and B6 as password to login in a website in chrome.

after login use cell A10 to copy data to chrome, press submit and exit.

after finishing one excel file do the same for rest in folder.

how can i do that?

i used For each File in Folder,
open chrome to page
and I got confused when i reached the part Use Excel File and setting a template file.

instead of opening each file in the folder it opens a new excel and copies empty cells.

i already did this with single excel, with Read per row.

But i need it to use each excel files data for each submission.

Thank you in advance

Hi

Welcome to uipath forum

Hope the belwo steps would help you resolve this

  1. Use a Assign activity like this

Arr_filepaths = Directory.GetFiles(“yourfolderpath”)

Where arr_filepath is a variable of type array of strings

  1. Then use a FOR EACH activity and pass the above array variable as input
    Change the type argument as string in the property panel

  2. Inside the loop use a EXCEL APPLICATION SCOPE and pass the filepath as item.ToString

Inside the scope use a READ CELL activity where mention the cell position and get the output in a string variable

Same use another read cell for password and one more read cell for the data you want to put in chrome

Save all those as a separate string variable with each read cell activity

  1. Then use a OPEN BROWSER and change the browser type as Chrome
    If you are using chrome make sure you have installled chrome extension as below
  1. Then use a TYPE INTO activity where pass the relevant string variable as input

  2. Use a close tab to close the browser
    And Ensure that all the above activities from step 4 to step 6 is inside the loop

This will repeat in loop and will do for all files

Cheers @neoklis.neokleous

1 Like

Sorry I am new to this.

How do I do these?

image001.png

Pls follow all the above steps in your studio
And let know for further queries

@neoklis.neokleous

i cannot figure this out…

EXCEL APPLICATION SCOPE and pass the filepath as item.ToString

got it. its File.ToString

@neoklis.neokleous

Here is a quick grab of the setup that @Palaniyappan wrote out to the point of reading the excel file. Hopefully it helps a little.

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