[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Excel Spread-Sheet created from PL/SQL

Posted on 2011-03-18
3
Medium Priority
?
2,577 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1000 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 1000 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
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.  …
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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…
Suggested Courses

649 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