Hi Everyone,
My requirement i have a huge excel with many rows
basically i need to get the first of the value under name column
can u suggest me some solutions in linq
Thanks in advance
Hi Everyone,
My requirement i have a huge excel with many rows
basically i need to get the first of the value under name column
can u suggest me some solutions in linq
Thanks in advance
lets assume the first part is always a digit
In general it is still a case for updating the collumn value within a for each row
For demp purpose a LINQ could look like this (datacol structure is important for the solution details)
Columns: Name, Value, origin datatable: dtData
Assign Activity:
dtResult = dtData.Clone
Assign Activity:
dtResult =
(From d in dtData.AsEnumerable
let spl = System.Text.RegularExpressions.Regex.Match(d("Name").toString, "\d+").Value
Let ra = d.ItemArray.Skip(1).Prepend(spl).toArray
Select r = dtResult.Rows.Add(ra)).CopyToDataTable
an alternate for let ra
Let ra = new Object(){spl, d(1)}
@ppr thanku it worked
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.