Counter to read line in excel


#1

I need to read a csv file with 139 records (I need to read only one column) and grab each record for once impute in a text field and search, after doing all the necessary searching it le the csv file again and pick up the second line and so on, I tried to use an accountant but it did not work, could anyone help me?
he is picking up all the lines at once and imputizing one after another.
Thank you very much in advance


#2

If you read the csv-file into a datatable and use for each row, you should be able to grab one record, perform the searching, and then move on to the next record.


#3

I’ve already tried to do this, and yet he does not just pick up one die every cycle

teste04.xaml (7.4 KB)
tim controle.xlsx (21.8 KB)


#4

Your code picks one number, then performs the message box activity, then loops through the next. So if you instead of the message box input whatever action you want to do with the number, you can do that instead.


#5

I tried to do this, but before I could click the search button it already took another value from another cell and imputed in the search field


#6

and even if it worked out the next time I needed to impute the data I read from the csv it would take the first one and I need it to go in sequence.
for example

1 search A1 cell
2 search - A2 cell
and so on


#7

teste04.xaml (8.4 KB)

See attached workflow. It’ll loop through the numbers, and then type each number into a field you need to specify. Is this what you’re looking for? If not, I think you need to be a bit more specific as to what you’re trying to achieve.

Edit: I’m sorry, the code in the assign box should be row(0).ToString not row(1).ToString


#8

Sorry, I can not explain it right.
I have an imput file that would be the csv file, I need to get every cell in that file and impute it to a search field on a site, get the data that returned that search and save it to another csv file.
The part of saving the data in the output file I already know how to do, however I need to see a way to read one cell at a time and the next time the robot goes through the for each it recognizes that I had already got that cell before and need to get the second .

for example I have a csv file with 139 phone numbers with the foreach I get the first cell and do all the necessary research that the robot needs to do, after finishing this search it goes through the foreach again and picks up the second cell and so on until it finishes the csv file


#9

for example, he should put only the first number and stop, but he impute one after the other as shown in the picture

1img


#10

Put the rest of robot in the for each loop and it will do what you want.

The for each loop remembers which number it has done; basically what a for each loop does it that it loops through the entire datatable and performs the same step. So if the next steps are “input telephone number into search engine, screenscrape the result and input that as a new variable, then add that variable to the datatable” then you’re going to achieve what you want.


#11

Can you post your entire code?


#12

In your for each loop:

  1. get number
  2. put it in search
  3. click login
  4. do all your steps

    Your bot will then perform everything for each number as required, you need to have all your steps in your for each loop otherwise you get your issues experienced above.

#15

Hi,

To read each and every comma separated value in a csv use below things

image

Followed by variable declaration
image

once value is declared use the following assign function
image


#16

assign the below values