@eshwarsai_ks,
To Identify the last column and row. you can use the below activities.
Thank you Balamurugan.S