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"
SQL>set markup html on
SQL>set feedback off
SQL>spool c:\test.xls
SQL>select * from user_objects where rownum <= 20;
SQL>spool off
SQL>set markup html off
thanks
ReplyDeletesame post here :
ReplyDeletehttp://chandu208.blogspot.com/2012/01/spool-command.html
See some examples here..
ReplyDeletehttp://shonythomas.blogspot.in/2011/07/export-and-create-excel-file-from.html
excellent....Thanks a lot :)
ReplyDeleteMuch useful info. Thank you!!.
ReplyDeleteThanks a lot!!! :)
ReplyDeletevery helpful.. Thanks..
ReplyDeleteBut the file is saved in HTML format.
ReplyDeleteOpening this file in Excel will not pose any problem because Excel can read HTML format, but other software will return invalid file format.
I had to open this file in Excel, then click SAVE AS XLS again.
Great info, thanks!
ReplyDeleteWorked, thank you!
ReplyDeletethanks
ReplyDelete