Solved

Excel Spread-Sheet created from PL/SQL

Posted on 2011-03-18
3
1,985 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Recently, an awarded photographer, Selina De Maeyer (http://www.selinademaeyer.com/), completed a photo shoot of a beautiful event (http://www.sintjacobantwerpen.be/verslag-en-fotoreportage-van-de-sacramentsprocessie-door-antwerpen#thumbnails) in An…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to recover a database from a user managed backup

705 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

19 Experts available now in Live!

Get 1:1 Help Now