Hello, I’m building a robot that downloads audio , i want it to copy text from excel cells and paste it after the following url :
but i have a problem that i can’t make him select cells.
i need someone to tell me how to select excel cells like : A1 copy , go to browser , paste , save audio , A2 copy , go to browser , paste , save sudio … and so on
i want a variable or something like that ( i hate variables because they are tricky but i’ll do it ) to solve the problem.
Better approach would be to use Read Range Activity to read the whole excel file into a Data Table and then use the For Each Row in Data Table Activity to iterate through whole data table and to get the required value you have to use - CurrentRow(0).ToString
For further information please read about these activities.
UiPath.Excel.Activities.ReadRange Reads the value of an Excel range and stores it in a DataTable variable. If the range isn't specified, the whole spreadsheet is read. If the range is specified as a cell, the whole spreadsheet starting from that cell...
Hope it works for you.
Instead of current row you write the data table name
and inside body use the row(0).ToString.
please look at the attached file
read data table.xaml (7.5 KB)
do you mean the name of the excel ?
oh , thanks for the file , It’s clear now … i’ll try it
what should i do to fix it
Follow these steps-
Use Read range(Workbook) activity to read the excel file and save it in a data table variable.
Use the for each row in data table activity and all other sequences will be inside the body of for each activity.(Do not use build Data Table activity, by using read range you have already saved the excel file into data table variable)
Wherever you want to use the excel cell value just use row(0).ToString
Check the template file
template.xaml (8.1 KB)
something messing ?
everything worked except that it didn’t write the excel words and didn’t save anything !
didn’t give errors didn’t type words and didn’t save it
June 14, 2021, 2:37pm
That is not how you use For Each Row. The “in” portion must reference the datatable.
Read Range puts the data into a datatable. Then you use For Each Row to loop through the rows in the datatable.
how to reference to the datatable then ??
June 14, 2021, 3:19pm
You put the datatable name into the “in” box for the For Each Row activity. Then it loops through the rows in that datatable. Inside the For Each Row you put the steps you want done on each row.
i know i’m asking a lot but sorry for that
It worked !
but no audio downloaded or numbers written in the browser
( the numbers are for testing and not the real thing it’s needed for )
June 14, 2021, 6:34pm
All you need is Read Range and For Each Row:
The Read Range puts it into myDT (or whatever you name it) and you use that datatable as the input to the For Each Row:
In the Body portion, you put the steps you need done to each row (build the URL with the data from the row’s appropriate cell, go to that URL, save the file).
By the way, if you hate variables then you should take some basic programming classes. Variables are essential to proper programming.
it worked uncorrectly but i did some enhancements and it’s working now right
But google stops it after some words and it needs a captcha verification , how to make the robot recognise the captcha button and click it ?
I didn’t comment yesterday because uipath forum tells me i have reached the maximum for a new user , but i’m not new with RPA and i have a uipath account for a year … strange things happen always.
i made it click the button but it makes an error when i try to step over and says ui element is no longer valid , What to do now to tell it to press the button if seen ?
i tried the if condition but it seems that it’s not solved by this way.