I often had the problem, that I had to process query results and provide them as excel files. Writing them on Unix systems. Usualy I wrote comma separated csv-files. But unfortunately when opening them excel begins to "guess" what datatype a specific value might be. So sometimes a number value 4.09 became a date 4-SEP etc.
Reading AskTom one day I found that you could set MARKUP in SQL*PLUS and excel accepts this as a valid format. Playing around a bit I found some useful features and wrote a package with HTML format as output.
Downside: the file can not be read by OpenOffice Calc. A friend gave me a hint about Microsoft XML format for spreadsheeets so I changed the output a little bit. Not every feature is available ib OpenOffice, but most are.
There is a bug in OpenOffice 2.3.1, it cannot open any XML file!
New: Instead of directly writing into a file you now can choose to write into a LOB
Look at submenue at right hand side
The software is not intended for use in productive environments. If you do so be sure to test thoroughly because I will not give support in any case. I don't claim that this software is free of errors (it certainly is not).
Perhaps owa_sylk from Tom Kyte will suit you better.
Jason Bennett wrote a similar program. The difference is mainly the ways to retrieve the document:
Sanjeev Sapre does not support borders, formulas and date format.