Export View results to CSV
Have you looked at Views Data Export. I've wired in a view to export on button click. You just build or modify a FAPI form to contain a button and give it the url of the view you want to output as csv.

In your case you'd pass the selected arguments into the view. You could use FAPI and Javascript to properly build the url and button action.