I am going to ask for your help as I couldt sort this out for weeks. Lets me to explain it. I am using 3 different Excel reports of Employees. I do read range and create data tables. Then I need to filter them by employee ID number.
2 reports works fine, 3rd not.
Read range works OK, data are in the data table. Column name is OK, even I swapped for number of column. It seems to me that Employee ID, for example, 34444, is not find in data table, but it is there!
I tried different formatting of Excel report - general, text, number… no success.
However, when I tested with new column National Insurance and filter it, filter found the person.
Summary:
Excel document has first column Employee ID, data table created, filter does not catch Employee ID and output data table has only headers. However, if I set up filters by different column, for example, National Number, output data table is correct.
Do you know what is the problem here? Why filter do not recognise employee number in data table?
Could you let us know what was the implementation done for the Filter part ?
Are you using Filter Datatable activity ? If so, Could you send a Screenshot of the Configuration done ?
Also, Maybe Performing a Debug on the datatable and checking its values would be able to help you in pointing out the irregularities in the values if any.
Mostly the issue looks like the empid is considered as numner…try using rawvalue whie reading or do not preserve format anf then filter datatable and make sure you give emp id as number instead of string…
Alternately you can use linq wuery where you can cast the type
Dt.AsEnumerable.Where(function(x) x("EmpId").ToString.Trim.Equals("341111")).Count to check if returned if need into a separate table then use .CopyToDataTable
Thank you for fast reply. Please see attached images.
I have created DataTable collection with 3 excel reports (dtListOfCollections). Then if the Employee ID is not find there, I duplicated the work only for problematic dtLeavers, to look at it again for Employee…
Employee ID is in variable called IOstrEmpNum (this is read from request in email)
But even if I amend variable IOstrEmpNum for Emloyee ID number, still is not find.
Thanks
… as new user I can add only 1 image, so I will try to add the rest in new window