How to generate CSV file through Automation Script

Hi,

We are generating some customized report through automation script. These report needs to be sent in CSV format to desired recipient. Is there any way to generate a CSV file through automation script?

Please help!

Regards,
Anshuman