Hello friends, Please, I wanted to ask you the following :
I want to generate two datatables from an excel sheet, as long as it has content.
In the attached example, columns “C” and “D” are the ones filled in by the user. If those two fields contain data, it is classified according to column “E”, then in the end I will have two datatables that I can go through to read their data and enter them into the corresponding web page. There is a web page for “LIMA” and another for “PROVINCE”.
I was thinking of two ways to evaluate the excel:
The first: An array of arrays, where each row of the excel contains
The second: A dictionary, (In this case it would be a dictionary for each column), but to evaluate if the data exists, I am not very clear
Do you know what could be more convenient for the problem? Test.xlsx (14.3 KB)
This is my input, and as output I want two data tables, one with the rows (4, 6, 9) and the second with the rows (13,16,20). My secuence on uipath is still incomplete, I’m not sure how to proceed. For a row to be added to a datatable, columns “C” and “D” must be filled, and these are filled by the user. And to define to which datable it will be added, column “E” is used
(From d In YourDataTableVar.AsEnumerable
Where {"REPORT","TYPE OF CLIENT"}.All(Function (x) Not (isNothing(d(x)) OrElse String.IsNullorEmpty(d(x).toString.Trim)))
Group d By k=d("Area").toString.Trim Into grp=Group
Select t =grp.CopyToDataTable).toList
Then iterate over the returned TableList and process the different datatables
Also have a look here:
Describing also non-LINQ Approaches which you can combine with filter approaches