Is there a way to select dynamic range in Excel?

Is there a way to select a dynamic range in Excel in order to create a table?

e.g. I’m extracting data from a website that differs in range on a day to day basis, so sometimes the range is smaller and larger.

HI @Sean_A

Have you tried leaving the range property empty like “” so it will consider all the data in that particular sheet regardless of the number of rows the sheet has?

May i also know whether the sheet contains only one set of data for a particular date? or does it have data for all the dates in that sheet itself?

Let know how it goes…

I tried leaving the range property empty like “” but it came up with an error.

This is what my sheet contains:

Thank you

what is the activity you used and what was the error?

Do you mean selecting as in selecting the cells in excel? Or its just reading the entire range into a data table?

It came up with this error (Excel Application Scope):



I want it to select the cells with data in them, no empty space.

Hi @Sean_A,

Can you be more specific what you are trying to achieve.

Do you want only few columns from the complete excel file or you want only from few rows for eg 50 to 100.

Okay. Now I get your problem.

Not all Excel Activities allow you to specify empty range, for selecting the entire used range. (Hope this changes soon :slight_smile:)

You can refer the documentation to figure it out - Compare the below two activities and you’ll get the difference.

Do you need to use an excel table for sure? or your intention was to sort the content somehow?
If yes, then I guess it would be easier to use datatable, rather than creating an excel table. You can try this.

Hi ,

Do we have any solution for this issue ,facing the same .


@SmithaSreenivasan @Sean_A
did you guys figure this out?

I am trying to create a Table from data in excel.
create table activity needs specific range from excel, but this range changes dynamically every time.
End goal is to create a pivot table using the created table.

Hi @Haroon_Patel Did you get a solution yet? im also facing the same problem

Hi @Ayodeji_Osikoya what I did is I read the DT than removed the columns not required so i had fixed number of columns.
rowsCount = DT.rows.count+1
used Create Table activity in Range I provided: “A1:F”+rowsCount.ToString (F being the fixed column in my case)
I am sure there is a better solution out there, hope this helps.

1 Like

Thank you. I would Try it and let you know if it works

Hi @Ayodeji_Osikoya @Haroon_Patel - If you want range to be fully dynamic…Please check this…where i have iterated dt.rows and then dt.columns and found the cell address using column and rowindex(Say Chr 65=A) …and use that range in Set Range color…

Thanks Guru @prasath17 will look into that.

it works, thanks a lot!