[Oracle] spool formatted export to excel
Because this material was used after querying a long time ago, the reference link can no longer be found.
There are a lot of parameter configuration information about spool on the Internet, search for the keyword "detailed explanation of spool parameters".
The cmd script commands are as follows:
Set linesize 200; set term off verify off feedback off pagesize 5000; set markup html on entmap off spool on preformat off;spool D:\ XXX.xls; (D:\ XXX.xls is the absolute path of the file) select * from abc.test; (here is a query statement, which can be written as standard sql, and abc.test is the database table) spool off
The exported * .xls is the formatted content.