Get Range, Indefinite excel rows read


#1

Hello All,

I know I can read and excel table in a table type variable by get range. But here I need to put the exact cell number upto which the reading can be done. Can you please guide how we can do this if the number of rows in the table is varying. Any idea will be of great help?

Regards,

Supriyo


#2

Hello,

Can you clarify exactly what the problem is? If it is a simple issue of wanting to know what the size of your table is then the following will work to read the table size into two new variables - num_rows and num_cols


#3

…If on the other hand you want to read the contents of a specific address in a table that you define somehow elsewhere in your code then it is a little more complex but the following works although not the most efficient computationally it’s fine for tables that are not too big:


#4

The logic is as follows:

  • Find the row you want in your table
  • Copy that row into a list
  • Find the column you want in the new list
  • Read the cell at the location.

Works also for empty cells in the table, including at the end.

Doing writing back to the table based on this logic is “left for the student as an exercise” :wink:


#5

Bonnero- First of All thanks a lot of your support. Here we have data in an excel. consider two columns. but indefinite leght. How can I read this data to a table type variable. Since in Get range we need to provide the end coordinates.


#6

@supriyo_sarkar It is not necessary. If you leave To cell # blank, the bot will select all the values to the last non-empty cell.


#7

thanks…Yeah I tested this, it works. One quick question, can we have a notification whenever you release a new version?


#8

@supriyo_sarkar Right now, we send notifications only for release that have major updates and new feature.
We will send emails for all new releases, and we are planning to add notifications in the recorder.