Hello all,
I have excel file alot of DLV & DLVS, I have to sort M4 & D4 to A-Z and get DLVS on top then DLV.
How can soft & filter data For Each Row in Data Table. Thank all
Hello all,
I have excel file alot of DLV & DLVS, I have to sort M4 & D4 to A-Z and get DLVS on top then DLV.
How can soft & filter data For Each Row in Data Table. Thank all
Hi,
Can you try the following expression?
keywords = {"DLVS-","DLV-"}
Then
dt = dt.AsEnumerable.OrderBy(Function(r) Array.IndexOf(keywords,System.Text.RegularExpressions.Regex.Match(r("ColumnD").ToString,"^.*?-").Value)).ThenBy(Function(r) r("ColumnM").ToString).CopyToDataTable
Please modify column name
Regards,
Hi,
Can you share your project or workflow as file?
Regards,
Hi @anh.nguyen
Can you try with
(From d In yourDt.AsEnumerable()
Order By If(d("Column1").ToString().Trim() = "DLVS", 0, 1)
Select r = d).CopyToDataTable()
Regards
Hi,
Can you check which type dt variable is? The above expression assumes dt is DataTable.
Regards,