One thing neat about SQL*Plus is that it can even generate HTML file in addition to text file.
Here's the example:
sqlplus_to_html.sql
>>
------------------------------------------------------------------------------------------------------------------
SET FEEDBACK OFF
SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP OFF
SPOOL D:\report.html
select '<FONT COLOR="RED">'||table_name||'</FONT>' "TABLE_NAME",'<FONT COLOR="BLUE">'||owner||'</FONT>' "OWNER"
from all_tables where owner = 'SYS' and rownum <=10;
SPOOL OFF
------------------------------------------------------------------------------------------------------------------
SQL> @D:\sqlplus_to_html.sql
Double click on D:\report.html to view the result:
TABLE_NAME |
OWNER |
AUDIT_ACTIONS |
SYS |
DUAL |
SYS |
HS$_PARALLEL_METADATA |
SYS |
HS_BULKLOAD_VIEW_OBJ |
SYS |
HS_PARTITION_COL_NAME |
SYS |
HS_PARTITION_COL_TYPE |
SYS |
IMPDP_STATS |
SYS |
KU$NOEXP_TAB |
SYS |
KU$_DATAPUMP_MASTER_10_1 |
SYS |
KU$_DATAPUMP_MASTER_11_1 |
SYS |
ps. "ENTMAP OFF" disables the substitution of HTML entities