How do I find the last row?

Hi.
A condition is a check from the last text of column i.
Then show the value 3

Thanks.
Perawat

Use Read Range and store output in Dt
Give range as per your convenience if you want for Column “I” then type “I:I”
and then use DT.Rows.Count+1 will give “3”

2 Likes

@ImPratham45

Data Type will be Int
If you want it as string then use
(Dt.Rows.Count+1).ToString

@ImPratham45

I changed to Int but the resulting value is 1048576.

is there any data in “I” Column

1 Like

@ImPratham45

Yes, I have information.

@ImPratham45

The file I used to test.
Master Stock - Copy.xlsx (11.3 KB)

Hi @Perawat

Please check the workflow attached,
Rowcount_Excel.zip (24.9 KB)

or
Please check this post might help you,

Thanks
Latika

1 Like

Hi Perawat,

Use below query in assign activity to get row count

Dt.AsEnumerable().where(Function(x) not string.IsNullOrWhiteSpace(x(“Status”).ToString)).ToArray().Count+1

Thanks,
Amaresan

1 Like

Hi. It should actually work when you just empty the range area field.

1 Like

@Latika10011740, Thank you so much for your help.

1 Like

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