How do I get the last value in Column A?

Hello everyone, I have the following information.
Test.xlsx (8.9 KB)

Thanks.
Perawat

@Perawat First get the number of rows present in the excel by Read Range or Read column and then use Read Cell activity and pass A+rownumber

1 Like

@Perawat use Assign

LastValue=dt(dt.Rows.Count-1)(Debit Amount).tostring

Assuming dt is datatable from above excel.

Hope this will help you.

1 Like

Can you write an example for me.

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

image

I just made a examle just have a look at it,
_Test.xaml (9.7 KB)

Hi @Perawat,

Here is an activity called “Find Last Row” . So it will return the last row index of the sheet. after you can use the read cell activity to get the value .

Thank you
Balamurugan.s

1 Like

@Lakshay_Verma, I don’t know which part is wrong.

What is the output of read range activity ?
It should be dt of type datattable

Looking at the message on popup,
You’re making varible of double type. it must be string.

@Perawat Can you do this and Check :
Capture

output

Where DT is the output of Read Range Activity

2 Likes

@supermanPunch I didn’t get results like yours.

@Perawat Try with this :
DT.Rows(DT.Rows.Count-1)(0).ToString

1 Like

@supermanPunch, I got results like yours. Thank you very much.

1 Like

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