I am wanting to output a Query to a CSV file and am using the below as a small test;
spool c:\\test.csv select /*csv*/ username, user_id, created from all_u
Exec the query in TOAD or SQL DEVELOPER
---select /*csv*/ username, user_id, created from all_users;
Save in .SQL format in "C" drive
--- x.sql
execute command
---- set serveroutput on spool y.csv @c:\x.sql spool off;