Hi Expert,
I have an excel file and want to file the status column and get only “No” status in other sheet. How can achieve this by LINQ. attached input file
Fil-Input.xlsx (9.1 KB)
Regards,
Balachander P
Hi Expert,
I have an excel file and want to file the status column and get only “No” status in other sheet. How can achieve this by LINQ. attached input file
Fil-Input.xlsx (9.1 KB)
Regards,
Balachander P
handling empty filter result
[FirstAid] Handling of The source contains no DataRows exception - News / Tutorials - UiPath Community Forum
Easiest would be to use a filter datatable and filter the column for No
if you need linq then use this in assign
requireddt= dt.AsEnumerable.Where(function(x) x("ColumnName").ToString.Tolower.Equals("no")).CopyToDatatable
after any of the above two steps use write range and write to different sheet
cheers
syntax : DT.AsEnumerable.Where(Function(r) r(“Status”).ToString.Equals(“No”)).CopyToDataTable
Can use this.
dt1.AsEnumerable.Where(function(row) row(“Status”).ToString.ToLower.Equals(“no”)).CopyToDataTable
DT=(From row In DT.AsEnumerable()
Where row(“Status”).ToString() = “No”
Select row).CopyToDataTable()
Hope this hepls
Try this:
yourDataTable = (From row In yourDataTable.AsEnumerable()
Where row.Field(Of String)("Status") = "No"
Select row).CopyToDataTable
Hope it helps!!