• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2671
  • Last Modified:

Excel Spread-Sheet created from PL/SQL

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
HRMorton
Asked:
HRMorton
  • 2
2 Solutions
 
PilouteCommented:
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
 
dansoreaCommented:
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
 
PilouteCommented:
@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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now