I have an excel how can i filter that

i have an excel that has lot of invoice numbers what i want to do is i want all invoice starting with particular extension to be save in dt like in below sheet i have 161-xxxxxxx, 161P-xxxxxx
161R-xxxxxx i want all to be saved in same dt

sample excel
New Microsoft Excel Worksheet.xlsx (8.4 KB)

Hi ,

First read the excel file and you will get the output in datatable variable.

On the datatable variable you can use select query like below:

Datatable.select("[Trxn_No] like ‘161%’").CopyToDatatable

1 Like

You can use Linq like that.

dt.AsEnumerable.Where(Function (row) row(“Trxn_No”).ToString.StartsWith(“161”) or row(“Trxn_No”).ToString.StartsWith(“161P”) or row(“Trxn_No”).ToString.StartsWith(“161R”)).CopyToDataTable

1 Like

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