Can we execute a query on DataTable


I am loading the data from excel to Datatable.

Can we use the DataTable as a database and execute the Select query.

You can use DataTable.Select, however that will give you the results in DataRow Array.

Check this,

Rammohan B.

Then you can convert the DataRow Array returned by the Select method to a new DataTable using the CopyToDataTable extension method. Please check this post on forum about this method.