The simplest method of exporting Oracle data to a flat file is
to use the spool file feature of SQL*Plus, which will create a
fixed format output file. To create a clean file several SQL*Plus
settings need to be modified to remove unwanted SQL*Plus messages
from the output. Using the emp table common to the Oracle manuals
here is a short sample sql script to create a fixed format spool
file: [Comments added after run]

--
set echo off -- suppress showing sql in result set
set feedback off -- eliminate row count message
set linesize 100 -- make line long enough to hold data
set pagesize 0 -- suppress headings and page breaks
set sqlprompt '' -- eliminate SQL*Plus prompt from output
-- other useful parameters
set trimspool on -- eliminate trailing blanks
spool emp
select *
from emp
where rownum < 6;
spool off