Fetching data from excel to use in an application

I have an application and an excel. In that excel, i have some name of ten companies one by one in each row. I have recorded a sequence of steps to be performed in my application. While running that recorded sequence, at one of the steps in the middle, robot has to go to that excel file and fetch the name of the first company and should come back to application to paste the name of selected company from that excel and do the remaining process under that recorded sequence. Once the process of recorded sequence completes, it has to repeat the same process with the next companies name present in the excel.
How can i make the bot to read each cell from the excel ? And thereby to store it under some variable to perform further recorded sequence.

Please help me to solve this…Thanks in advance

@Palaniyappan

1 Like

@GaneshPalaniappan

  1. Use Read Range activity to read the data from excel file and will give you output as DataTable and say ‘DT’. And then use For Each Row activity to iterate one by one row.

    ForEach row in DT
    pass row(“ColumnName”).Tostring to that application.

1 Like

Fine
Hope these steps would help you resolve this
—use EXCEL APPLICATION SCOPE and pass the file path of excel as input
—inside the loop use READ RANGE a activity and get the output with a variable of type datatable named dt
—now use a FOR EACH ROW activity and pass dt as input
—inside the loop use OPEN APPLICATION where mention the file path exe file of your application or START PROCESS activity where mention the file path of application exe file so that it will open the application
-that is we are still inside the for each row loop and if open application keep with that the set of activities to be performed in that application or if it’s start process keep the set of activities next to that start process but both cases it should be inside the loop

—now to access the column and row value use this expression
row(“yourcolumnname”).ToString which will get the value of a particular column at that row which is under iteration

—atlast inside the loop use close application activity to close that app if you want so that when the iteration goes for next row it will open the application freshly pressed or if it’s fine use send hot key activity with back key so that it will take us back to the home page like how we do in keyboard

—so once after this row value gets entered to the application the loop will take us again to the next row and it goes on

Hope this would help you
Cheers @GaneshPalaniappan

2 Likes

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