How to Find last index in excel sheet by default

Hi All,

Thanks in Advance .

First i am writing the data into excel sheet using write range activity but i want to know how many rows data is filled and what is the last row index number and range value.

How can i get the last row range (eg: A1 to D30 data is filled )

Hi,

If you are writing the excel using Datatable then your datatable row count is the last index.
If you are writing row by row , then you can read the sheet using read range and the total number of datatable rows is the last index.

Hi @sarathi125

Thanks For the quick response

Datatable.Rows.count will count count of the sheet(eg: 100 or 120)
But i am expecting like A99 or A119

Hi @Naveen.Ch,

Datatable.rows.count gives 100 but datatable starts from 0, so you have to subtract 1 from datatable.row.count

Now your expression becomes (datatable.row.count-1) and this expression gives you have 99 rows and you can append A to 99

1 Like

Hi @anil5

Thanks for the reply.

I am aware on that procedure
but i am looking for is there any way to find directly last value of row like A19 to B120 like that.

Hi,

Check the attached XAML, it will give you the Column name for the input Column Number.
So now you have the column name + row count = expected value.ConvertToLetter.xaml (8.1 KB)

@Naveen.Ch,

If you already have a solution why you want to go for a new one, its the best and easiest solution to get the last value.

So if there is a specific requirement from your project, where you want to save the efficiency ,time and get the last value directly, please let us know.