Unanswered: Output needs to be formated into excel
I am using a sql command to produce outputs having 3 columns
Before running the sql I am spooling the output in .xls format
But when I open the .xls file (i.e. the spooled file) data of all the 3 columns appear in a single column with blank spaces between them
Is there a way by which I can ensure that each output column of the SQL appears in a seperate column in the excel Sheet
Naming the output file "something.xls" definitely doesn't mean it is an MS Excel file (just as if I saved this message into a file, named it "runme.exe" and expected it to, actually, do something when double-clicked).
The easiest way would be producing a CSV file (Comma Separated Values file). Separator doesn't necessarily be a comma (,) - it may be a semi-colon (;) or any other "special" character (different from the rest of "normal" data) which would uniquely distinguish one column from another.
Once you have this CSV file (extension doesn't matter - it will be an ordinary text file, so you can name it file.txt, file.csv, file.anything), run MS Excel and OPEN this file. Follow instructions Excel provides - whether columns are fixed (in that case, you wouldn't even need a separator), specify a delimiter (, or ; or ...), specify column datatype and that should be all.