Select query

Hi Friends,

I need to filter data using key “Head Number” and “Line Number” and create new excel files with filtered data.

image

In the above case , i need to get the result as 2 excel files.
excel 1:

image

Excel 2:
image

can anyone help me

NewDT= DataTable.Select("[Line Number] = ‘1’ “).CopyToDataTable
NewDT2= DataTable.Select(”[Line Number] = ‘2’ ").CopyToDataTable

You can also use filter data table activity

1 Like

hi thanks a lot,

But this data is dynamic.
i may have different head and line Nos.
Do you have any idea to achieve that.

image

Currenly I took the " head No" column as an array and , used the below select inside for each ,
but i could filter using “head” only. i want to add "line No " also as a key

(From p In recFileDt.Select
Where p(0).ToString.Equals(item.ToString)
Select p).ToArray.CopyToDataTable()

Please following the attachmentMain.xaml (7.2 KB) project.json (908 Bytes) SourceData.xlsx (10.8 KB)

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.