How to export customer data to a CSV file