Question: how to export data from oracle to excel using sqlplus?
Answer: Step 1: Login into database using SQL PLUS. Step 2: Set markup using below command. SET MARKUP HTML ON. Step 3: Spool the output to a file. SPOOL C:\TEMP\MYOUTPUT.XLS. Step 4: Run your SQL Query. SQL QUERY. Step 5: Set the Spool Off. Step 6: Open the output XLS file to view the output.