Home » SQL & PL/SQL » SQL & PL/SQL » Want sql output in xls format (linux)
Want sql output in xls format [message #310649] Tue, 01 April 2008 23:28 Go to next message
manish9774
Messages: 5
Registered: April 2008
Junior Member
How could i get sql query data in xls sheet(Formated).I am using spool option to get data in xls sheet.Is there any other way to do that.
Re: Want sql output in xls format [message #310651 is a reply to message #310649] Tue, 01 April 2008 23:30 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Before you post anything in this forum be aware that this forum is meant for Expert SQL problems.
This does NOT mean that experts only read this forum; 99% also read the Newbie-forum!

So, before posting here ask yourself the following:
- Do I consider myself an expert?
- Do I think the problem at hand is a difficult one?
- Is my problem strictly SQL-related?

if you answer at least one of the above questions with "No" or "Don't know", find the appropriate forum here at OraFAQ.
If all three are answered "Yes", you are most welcome to post here!

[Updated on: Tue, 26 February 2008 23:37]

Re: Want sql output in xls format [message #310656 is a reply to message #310649] Tue, 01 April 2008 23:41 Go to previous messageGo to next message
manish9774
Messages: 5
Registered: April 2008
Junior Member
Further i will keep this in mind but please provide solution
Re: Want sql output in xls format [message #310658 is a reply to message #310649] Tue, 01 April 2008 23:49 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Further i will keep this in mind but please provide solution
NO!
Re: Want sql output in xls format [message #310683 is a reply to message #310649] Wed, 02 April 2008 01:18 Go to previous messageGo to next message
cherry
Messages: 56
Registered: December 2007
Member
I used to
set markup html on spool on 

--specify a file with extension htm or html 
spool c:\ex1.html 

--your query 
select * from dept; 

--end the html file 
spool off 

--set back to normal output 
set markup html off spool off 


SET VERIFY OFF;
SET SERVEROUTPUT ON SIZE 1000000;
SPOOL file_name.txt;
select * from table;
SPOOL OFF;


But you already are spooling into XL. Per my knowledge, its not possible to return formatted result, unless you use some other language like PERL to do so.

Try using other tools to export (ex Toad, Sql developer).

@ the end you should remember, SqlPlus is not a reporting tool.
Re: Want sql output in xls format [message #310684 is a reply to message #310649] Wed, 02 April 2008 01:19 Go to previous messageGo to next message
cherry
Messages: 56
Registered: December 2007
Member
I used to
set markup html on spool on 

--specify a file with extension htm or html 
spool c:\ex1.html 

--your query 
select * from dept; 

--end the html file 
spool off 

--set back to normal output 
set markup html off spool off 


SET VERIFY OFF;
SET SERVEROUTPUT ON SIZE 1000000;
SPOOL file_name.txt;
select * from table;
SPOOL OFF;


But you already are spooling into XL. Per my knowledge, its not possible to return formatted result, unless you use some other language like PERL to do so.

Try using other tools to export (ex Toad, Sql developer).

@ the end you should remember, SqlPlus is not a reporting tool.
Re: Want sql output in xls format [message #310689 is a reply to message #310649] Wed, 02 April 2008 01:44 Go to previous messageGo to next message
coleing
Messages: 213
Registered: February 2008
Senior Member
Do a Search for XML spreadsheets.

You can create multi workbooks, formulas, formattng with these. THere are already a few usable solutions around.
Re: Want sql output in xls format [message #310698 is a reply to message #310649] Wed, 02 April 2008 02:01 Go to previous message
S.Rajaram
Messages: 1027
Registered: October 2006
Location: United Kingdom
Senior Member
Check this link. It might be of help to you.
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:828426949078
Quote:
I am using spool option to get data in xls sheet
If you don't mind could you elaborate more on the above statement.

Regards

Raj
Previous Topic: Pl/Sql procedure update statistics
Next Topic: Role based schema access
Goto Forum:
  


Current Time: Thu Feb 06 16:42:35 CST 2025