Hi , I have Excel data with Columns Name Like “EmpId, Name, Age, Department, Salary, Location”. reference use clicks below Image.
I want to get Data, whose Department is HR. But When I’m using the Select method, Getting error. Please resolve this
Hi , I have Excel data with Columns Name Like “EmpId, Name, Age, Department, Salary, Location”. reference use clicks below Image.
I want to get Data, whose Department is HR. But When I’m using the Select method, Getting error. Please resolve this
Check if this works for you
Filtred_DT=Your_DT.AsEnumerable().Where(Function(row) row(“Coulmn Name of DT”).ToString=“txt toFilter”).CopyToDataTable()
Below is a related post
This is not working for me. Do we have to import something here ?
Hi @Chand,
Try this syntax:
dt_Emp.Select(“[Department]='”+Filter+“'”)
or simpler:
dt_Emp.Select(“[Department]=‘HR’”)
it worked. thanks
Hello @loginerror
this is not working for me Let see my images
Based upon filter value , I want get result as shown in image 3.
Please can you explain your code
Provide 07 within single Quote as ‘07’ and try
same issue, Can’t find the column
Hello,
I tried one more method , That is also not working to me . Let see below images you will get idea. Please let me know any have alternate method or excel macro codes.
Please check if there is any space in column header “Division”.