How to read values from cell dynamically

Hi Team,

I want to read Total sold and total earned values from attached spreadsheet but it will change dynamically.
I will be in D and E column but not sure which cell so how to pick those values from spreadsheet.

Legal entity Category verification time
Issued by code date approval code date
aks 123 20180701 20180701
item rate total sold total earned
apple 80 2560.3 112
orange 12 114
guava 24 118
2560.3 344

If the Total sold and earned is in last value,

  • Use Read range to read excel to Datatable
  • Assign LastCell = Datatable1.rows.count-1
  • Assign TotalSold = Datatable1.rows(LastCell).item(2).tostring

As vivek said you can get

  • Assign TotalSold = Datatable1.rows(LastCell).item(2).tostring
    and totalErned=Datatable1.rows(LastCell).item(3).tostring

No it is not last cell after that we have some more description

Issued by code date approval code date
aks 123 20180701 20180701
item rate total sold total earned
apple 80 2560.3 112
orange 12 114
guava 24 118
2560.3 344
Explanation:
Please consider latest values for all objects.

something like this

need debt and credit to read

Instead of reducing the count by 1, reduce by 6 or 7.

  • Assign LastCell = Datatable1.rows.count-7