Here are steps I used to archive my goal:
- start command line (CMD)
-
set NLS_LANG variable
set NLS_LANG=.UTF8
-
start sqlplus and log to database
sqlplus user/pwd@db
-
set long line size and avoid paging
SQL> set linesize 4000
SQL> set pagesize 0 -
set markup html in sqlplus
SQL> set markup html on spool on
It is important to use spool on clause, as it adds html header to spool file when spooling is started -
start spooling
SQL> spool a.html
-
run your query
-
turn off spooling
SQL> spool off
- open file in Excel
Cheers, Paweł


