Question: how to export data from oracle to excel using command prompt?
Answer: Put that select in a script (save as file) and pass it to sqlplus command line oracle client. Then save the output created by sqlplus in a file and you will have csv file which you can open with excel.