Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: oracle output to excel

Re: oracle output to excel

From: D.J. Platt <djplatt_at_cogeco.ca>
Date: Wed, 08 Feb 2006 21:53:49 -0500
Message-ID: <W8yGf.35915$1Z.35305@read1.cgocable.net>


D.J. Platt wrote:

> Database r via DBMonster.com wrote:
>

>> If your tables are not that big, then with spool create text file 
>> delimited
>> (kind of csv) and then open it with excel.
>> You can make a script that will spool data on  the daily basis
>>
>> If tables contain a lot of data, then spooling can significantly slowdown
>> database. You can try using some third party high-speed products like
>> fastreader to extract data into csv :  www.wisdomforce.com
>>
>> Murtuja wrote:
>>
>>> I want daily report in Excel format.and this excel file should be
>>> mailed to client.I want autoamtic process for that just like cron job.
>>>
>>> I am using Oracle 9i on Linux
>>
>>

>
> Something like this? sends csv instead of xls but Excel can open it.
> Shell script is first. SQL second.
>
> dj
> ---------------cut here-----------------------------
> #!/bin/sh
> . ~/.bash_profile
> HOMEDIR=/u01/app/dataguy/Work;export HOMEDIR
> MAILLIST="yournames_at_youraddress ";export MAILLIST
> #
> cd $HOMEDIR
> rm -f *.csv
> sqlplus rxadmin/rxadmin @ $HOMEDIR/report.sql
> #
> /usr/bin/uuencode report.csv report.csv | mail $MAILLIST -s report.csv
> --------cut here ------------------------
> SET HEADING OFF
> SET PAGESIZE 0
> SET FEEDBACK OFF
>
> SPOOL report.csv
>
> SELECT 'Table,Tablespace'
> FROM DUAL;
>
> SELECT table_name||','||tablespace_name
> FROM user_tables;
>
> SPOOL OFF
> exit
> --------------cut here -------------------------
Received on Wed Feb 08 2006 - 20:53:49 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US