Export the results to CSV