it worked thanks @aksh1yadav . one more question how to write these output in to excel file ? here output is in the form to string how to covert it into data table ?
DataTable.Select method gets an array of all DataRow objects.
one possible solution would be to use the DataTable.ImportRow method to convert this array to datable:
Here is an example: ImportRow.zip (2.1 KB)
Problems Adding/Removing Rows from DataTables
How to get System.Data.DataRow array please show me