Solved

Excel Spread-Sheet created from PL/SQL

Posted on 2011-03-18
3
2,023 Views
Last Modified: 2013-12-19
Hi,

I have an Oracle PL/SQL procedure that creates a csv file with output.

I would like to create an Excel spreadsheet with multiple tabs, seperate information in each tab, being populated from the PL/SQL Procedure. The procedure is being called from a Unix script.
Is it possible to create an excel spread-sheet and enter the name of the tab to use for the information, or even create multiple csv files and combine to a single multi-tab Excel spread-sheet.

Thanks Heather



0
Comment
Question by:HRMorton
  • 2
3 Comments
 
LVL 7

Expert Comment

by:Piloute
ID: 35163918
Hi,

Two solutions you can consider :

- the simple one, from a source I don't really know
http://sanjeev-oracle-world.blogspot.com/2007/06/create-excel-workbook-by-plsql-code.html

- the reliable one, that is not so simple (but uses PL SQL) :
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:728625409049

There's also another solutions that use Java, like POI from Apache, but you need to code in Java for using this :

- http://poi.apache.org/

Cheers,
P
0
 

Accepted Solution

by:
dansorea earned 250 total points
ID: 35163988
Do you use PL/SQL Developer? I have version 8.0

In the Manual.pdf there is the following paragraph:
"To quickly manipulate the result set information in Microsoft Excel, select the Copy to Excel item. This
will export the selected data to a temporary file and open it in Excel. If the selected data is more than
65535 records, it will be split over multiple Excel pages. If you have multiple result sets you can also
use the Copy all to Excel item instead, which will create a separate excel page for each result set."

Maybe it helps.
Good luck.
0
 
LVL 7

Assisted Solution

by:Piloute
Piloute earned 250 total points
ID: 35165331
@dansorea :

HRMorton asks how to create the excel with PL/SQL code, or at least through something that is triggered by shell commands (for automation porposes, probably)...

1) Does PL/SQL Developer work in Unix, since the author also asks for shell support ?
2) If yes, is there any command line interface - API - in PL/SQL Developer I ignore ?

Don't hesitate to post links to documentation about PL/SQL Developer, since it is a quite popular tool...

Rgds,
P
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now