Get the App
SLTechnology News&Howtos  ›  Database  › 

[Oracle] spool formatted export to excel

Shulou Source: shulou.com Published: 2022-06-01 03:38:47 11月15日 Update

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.

Tags: Data parameters query format key keyword content writing command that is data database file standard script statement path link post reference Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Xiaomi OPPO Reno Linux Redmi