Question

Find the first empty cell and copy the value

  • 31 May 2023
  • 2 replies
  • 161 views

Badge

Hello.

 

I’m trying to create a BOT but I’m experience some difficulties. I would like it to open a website (on Firefox) and another website (an Excel sharepoint). So far so good.

I would like the BOT to run all the rows in the column A and stop on the first empty cell.

Then, I would like to copy the value from cell B(#row) to the previous website textbox. And cell C(#row), and D(#row), and so on.

Then, repat the process until it finds another empty cell.

 

Could you help do that please?

 

Thank you for your support.


2 replies

Userlevel 3
Badge +10

Hello @RLeite 

You can use Loop for each row in worksheet, so you will not need to find empty cell I think.

In the Loop(each row in worksheet) you can record it to a variable, for example lets name it to ExcelRec

probably $ExcelRec{0}$ will be A column,  $ExcelRec{1}$ B column, and so on, you can see it in messageBox, and change it if its wrong.

By getting ExcelRec values you will get any column data for each row.

and you can set text(or use simulate keystrokes) on the website by getting those ExcelRec values.

If that’s not understandable, you can ask.

Regards,

Userlevel 2
Badge +8

I’d highly recommend getting the data from your excel sheet immediately into a data table and loop through the table instead. When looping through a data table it’s very easy to put the row into a Table Row type of variable and then you don’t need to worry about row positions in the source data.

And you will need an IF action within the loop to check if the row has any data. If it does not “do nothing’ if it does have data, populate your other app. Note you can keep track of the rows in your other app that you are entering data into using a number variable. You should only increment that variable when you find a row with data.

Without seeing the web based interface you’re entering data into it’s hard to get into more specifics of determining where you are in terms of data entry in the other web page.

Reply