Dynamic read range

U want to read data in column dynamically. Suppose, column starts from “A4” but the last row will always be changed. It may be “A7” or “A1000”. How can i select last row of the column dynamically. Could anyone please kindly help.

@Sabbir_Anwar

In read range…if you give the range as A4 then it would automatically read till the end of document…or the end of data

Please try that

Cheers

HI @Sabbir_Anwar

If you want to read only A column

As @Anil_G suggested you can Read the data from A4 it will get you the whole data upto last row

after that use Filter Datatable and in filter wizard give it like below in the Output Column


b

it will get you the first column alone

Or else

Method 2 :

  • Read range from the A4 and store them in a variable called dt.
  • Read Range from the cell “A4:A”+(Dt.Rows.Count+5).ToString and store them in another datatable

Regards
Sudharsan