How to get 1st and last value from column a1 in excel?

I am trying to get 1st and last value from column.

Hi @rahul_gola
use the below code

First value : dt1.Rows(0)(0).ToString

Last Value: dt1.Rows(dt1.Rows.Count-1)(0).ToString

where dt1 is the datatable variable which stores the excel data

Regards,

Nived N

Happy Automation

1 Like

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