Thursday, August 1, 2013

Oracle: Spool to Excel from SQLPlus

Spooling the output from SQLPlus to log file is often in unreadable format.

To Spool SQLPLus output to Excel (.xls) file, the trick is to turn On "MARKUP HTML"

set markup html on
set feedback off

spool c:\test.xls

select * from testdta.f0101
spool off

set markup html off