This is a bit tricky because the built-in CSV action in Xataface is designed to work within the context of the current found set. Since you are doing your own custom result set here (not influenced by the Xataface request variables) you won't be able to use the default export CSV action.
However you can create your own custom action. Check out the actions/export_csv.php action for tips on how you might do it.
Then you can add your own button to your custom action.
-Steve