Solved

Excel Spread-Sheet created from PL/SQL

Posted on 2011-03-18
3
2,163 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

828 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