Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to spool to EXCEL with header?

Status
Not open for further replies.

jasontektips

Programmer
May 30, 2003
23
SG
Hi,

I have a simple script to spool all records(data) from a table into an EXCEL file. But the header(ie. column names) gets truncated if the data field length is shorter than the column name. See below:

spool d:\testtest.xls;
set markup html on;
set pagesize 9999;
select * from my_table;
set markup html off;
spool off;

What should I add to the above to ensure the column names of the header record will not be truncated?

Many thanks.
 
Hi Sem, would you be able to add on the codes I've provided .. Sorry as I dun really know how to define explicitly ..

Thanks :)

Jason
 
Open sql*plus manuals and read about COLUMN command, especially its FORMAT option. Briefly: you may set headers that differ from column names (aliases) as well as format column data (namely set display length).

Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top