How to Validate Excel Data

Hello Guys, I am having Excel sheet with certain Columns Employee Id,Location, CTC,Designation…

  • I need to validate Employee Id consists of 9 digits or not…??
  • Location Should be only particular names mentioned in Validation Sheet.?
  • CTC(some columns should not be Empty)…??

Can anyone suggest me how to proceed…??

The below solution would be better.

  • Read excel sheet range.
  • Perform the conditions in Linq
  • Save to Sheet which requires Valdiation.

But validation can also be done using macro.

1 Like

Hi @Priyanka_Ramesh Can u please elaborate a few steps ??

Thanks in Advance

  1. Read the Excel sheet using read range -(output is dataTable)
  2. In Assign Activity filter based on required condition:

dataTable = dataTable.AsEnumerable().Where(Function(s) s(“id”).ToString.Length<=8 And convert.ToInt32(s(“Age”).ToString)>=33 and s(“CTC”).toString.length !=0 ).CopyToDataTable