Is there any sql/sqlplus command to redirect output from oracle database to EXCEL...
Thanks in Advance
Printable View
Is there any sql/sqlplus command to redirect output from oracle database to EXCEL...
Thanks in Advance
Connect to Oracle from Excel by Using ODBC connectivity
once you are connected you will have an option of using
a query write the query and the output will be in Excel
sheet.
For ODBC connectivity: Go to Data - Get External Data-
New datasources - (Select ODBC)
You can indirectly do it with the "colsep" attribute of sqlplus. With this method, you willl have to spool your output to a file and then load it into excel.
From sqlplus:
set colsep |
spool xxx.out
select ......
spool off
Then, load the pipe seperated file into excel.
or you can set the column sep to a , (comma) and give the spool file an extension of .csv.
In this way once the spool is done you can just double click on the .csv file and excel will automatically launch it.
simply take the normal spool from your select statement. and open the spool file in excel using menu.
it will ask for column partitions.