How to find Last empty row of Specific Column i.e.,(first name column)
and get the respective empid of empID column. please find attachment for reference
Hi @Rajesh_Pamu ,
If using the Modern Excel activities, you could check the Find First/Last Data Row
activity.
If you require it in a Datatable method, then you could check the below :
DT.AsEnumerable.Where(Function(x)Not String.IsNullOrWhiteSpace(x("FirstName").ToString)).Last.Item("EmpId").ToString
Hi
Hope the below steps would help you resolve this
- Use read range activity and get the output as a datatable named dt
- Now use a assign activity to get the empid value of last empty row of a column
Str_empid = dt.Rows(dt.Rows.Count)(“Empid”).ToString
Cheers @Rajesh_Pamu
Thank you @supermanPunch its worked
it is showing, there is no row at position 10 while using this
Hello @supermanPunch I am getting that empID as 106 by using the given solution as the empty row respective empId is 107 . I can get it by increasing one number but is there any possible to get it by not using increasing the empId.
Thanks in Advance.
I believe if that is the case, then you would require to use the below Expression :
DT.AsEnumerable.SkipWhile(Function(x)Not String.IsNullOrWhiteSpace(x("FirstName").ToString)).First.Item("EmpId").ToString
Great bro…!!! @supermanPunch Thank you. its working
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.