How to get dynamic cell range


I am downloading excel sheet from web application every day the cell range will change.

How to identify cell range in studio and write the data from dynamic cell


Hello @Sai.Srinivas
Try this.

  1. Use the Lookup range to get the Column name.
  2. Based on it you can set condition for the read range.

Hi @Gokul_Jayakumar

Can you provide with some code

Sure, @Sai.Srinivas
Share some Sample Inputs and your expected output. It helps to provide you with a better solution


Sample.xlsx (37.2 KB)

In a excel i have 526 records if download same file next month it would be less or more i need to get active cell after cell is overwritten above.


Hello @Sai.Srinivas

You can use the below activity to achieve this.

Else you can use the below approach.


Thanks for the reply,

But i need to bot should find out the cell range and write the rest of the data from other source in excel.

example: i have 100 records in A column
that means Cell range is A100. bot should fetch the cell range A100 is last cell and write rest of the data from source starts at A102


@Sai.Srinivas , If you need to write data below the excel, can use Append range actvity.

Kindly Refer to this xaml file, you may get some idea (207.7 KB)

Hi @Sai.Srinivas ,

The easiest way is to use ‘Append range’ activity. This activity will automatically write the new data after the current last row. But if you don’t wanna use that then you can follow below steps to do it the other way.
Just read the entire sheet with ‘read range’ activity. count the number of rows using the count function.

Int_Var = Your_DT.Rows.Count

This will give you the exact count of rows currently written in the sheet.
Next step, You can simply pass this as a variable in the range section of the ‘Write range’ activity. Range section will look something like


Hope this helps you.

Ashutosh Gupta



if we use Append range it will write next row which will write next to last row but i want to give 2 blank rows and write a data

You can also add blank rows in your data table before using append range activity.

Please look at the below thread for more info.
How to add an empty row in a datatable

Please mark this as the solution if your issue is resolved to close this thread.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.