SQL to Excel with formatting

Soldato
Joined
31 Oct 2005
Posts
8,845
Location
Leeds
Wondering if anyone can shed some light on this for me, as I use SQL on a daily basis but it's been a while on basic HTML:p

I've been using the

SET MARKUP HTML ON

command in order to try and export my SQL queries into pre formatted .xls format.

Now whilst the below code is sucessful in that it will export vaguely similar to what I'm after, I wish to apply some colour, bold, background tags to it.

I'm wondering if this is possible? As my below code doesn't seem to work. Now I'm guessing if I exported this as a .html file it would make it easier, but it must be an excel file.

(Note I could just export into a .csv or apply a macro, but I don't want to do that.

Cheers in advance for any help

Code:
SET PAGESIZE 50000

SET MARKUP HTML ON TABLE "table.detail {width: 100%;}table.detail td {padding-left: 5px; padding-right: 5px; background: #0000FF; color: #0000FF;}table.detail th {padding-left: 5px; padding-right: 5px; text-decoration: underline;}" ENTMAP OFF


SET FEEDBACK OFF
SET TERMOUT OFF

spool mic3.xls

select 'test', 'test2' from dual;

spool off
 
Back
Top Bottom