Have you already had a look at this for example:
Writing a DataTable to a CSV file[
^]
With a little modification you can make it to export only desired rows from a datatable. Personally I'd make a change and use a DataView instead of a DataTable as a parameter to
WriteDataTable
. This would make it easy to use a filter.