-
How to Export Oracle Data to Excel Sheet ??
HI,,
I need to export some of Fields from my table to Excel sheet.. How to export this?
Can any one give brief description.. PLease
Vijay
-
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
-
-
Hi Vijay,
you can try to get data from a table to excel sheet by using Toad
try it...
-
how to move
Originally Posted by deeviju
HI,,
I need to export some of Fields from my table to Excel sheet.. How to export this?
Can any one give brief description.. PLease
Vijay
fateme
-
Originally Posted by albaloo
fateme
after four years? "fateme"? wot?
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
-
Hello,
to export data from table to Excel you may use ora_excel package.
If you just need to select some fields and export them then you may use query_to_sheet procedure otherwise you may also create formatted version of Excel worksheet.
Short example about how to create excel:
BEGIN
ORA_EXCEL.new_document;
ORA_EXCEL.add_sheet('Sheet name');
ORA_EXCEL.query_to_sheet('select column1, column2, column3 from my_table');
-- EXPORT_DIR is an Oracle directory with at least write permission
ORA_EXCEL.save_to_file('EXPORT_DIR', 'example.xlsx');
END;
This code will create excel document with sheet "Sheet name" and put inside data returned from query "select column1, column2, column3 from my_table", excel will be save to file examle.xlsx within EXPORT_DIR (Oracledirectory)
It's also possible to save generated Excel file to BLOB variable.
More details you can find at: http://www.oraexcel.com/examples/pl-...o-sheet-export
Cheers
-
I usually do something like the following. This way you don't need to find the oracle_excel
package and you can run it from a linux server and mail the output to anyone. I sent monthly
rman reports using this method at a previous job.
Code:
set echo off
set pagesize 0
set linesize 170
col text format a170
set tab off
set trim on
set timing off
spool /tmp/myexcelfile.csv
select '"'||table_name||'","'||tablespace_name
||'","'||num_rows||'","'||compression||'"' text
from user_tables where table_name like 'DBA%' order by 1;
spool off;
set echo on
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|