Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/mortenbra/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
eaolson committed Jun 16, 2017
2 parents 3bffe1e + 8d86031 commit dc3fac1
Show file tree
Hide file tree
Showing 17 changed files with 2,921 additions and 211 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# alexandria-plsql-utils
Oracle PL/SQL Utility Library

<img src="http://plsql-utils.googlecode.com/files/alexandria-logo.jpg">
![](alexandria-logo.jpg)

This library is a collection of various utility packages for PL/SQL, as well as links to useful libraries hosted and maintained elsewhere.


##Generate PDF files using PL/SQL


* http://technology.amis.nl/2012/04/11/generating-a-pdf-document-with-some-plsql-as_pdf_mini-as_pdf3/
* http://technology.amis.nl/blog/8650/as_pdf-generating-a-pdf-document-with-some-plsql
* https://technology.amis.nl/2012/04/11/generating-a-pdf-document-with-some-plsql-as_pdf_mini-as_pdf3/
* https://technology.amis.nl/2010/10/20/as_pdf-generating-a-pdf-document-with-some-plsql/
* http://www.erasme.org/PL-FPDF,1337?lang=en
* http://ora-00001.blogspot.com/2009/10/free-pdf-package-for-plsql.html
* http://sourceforge.net/projects/pljrxml2pdf/
Expand All @@ -21,7 +21,7 @@ This library is a collection of various utility packages for PL/SQL, as well as

##Generate Excel files using PL/SQL

* http://technology.amis.nl/blog/10995/create-an-excel-file-with-plsql
* https://technology.amis.nl/2011/02/19/create-an-excel-file-with-plsql/
* http://www.jasonsdevelopercorner.com/?page_id=8
* https://xml-spreadsheet.samplecode.oracle.com/
* http://sanjeev-oracle-world.blogspot.com/2007/06/create-excel-workbook-by-plsql-code.html
Expand All @@ -39,15 +39,15 @@ This library is a collection of various utility packages for PL/SQL, as well as
<img src="http://upload.wikimedia.org/wikipedia/commons/thumb/1/1b/X-office-document.svg/48px-X-office-document.svg.png" align="right" /><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/0/07/X-office-presentation.svg/48px-X-office-presentation.svg.png" align="right" /><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/f/f8/X-office-spreadsheet.svg/48px-X-office-spreadsheet.svg.png" align="right" /><br>

* http://ora-00001.blogspot.com/2011/02/working-with-office-2007-ooxml-files.html
* http://technology.amis.nl/blog/8090/parsing-a-microsoft-word-docx-and-unzip-zipfiles-with-plsql
* https://technology.amis.nl/2010/06/09/parsing-a-microsoft-word-docx-and-unzip-zipfiles-with-plsql/
* http://www.docufy.be/
* OOXML_UTIL_PKG

##Zip and unzip files using PL/SQL

<img src="http://upload.wikimedia.org/wikipedia/commons/thumb/9/9c/The_Unarchiver_zip.png/64px-The_Unarchiver_zip.png" align="right" /><br>

* http://technology.amis.nl/blog/7626/utl_compress-gzip-and-zlib
* https://technology.amis.nl/2010/03/13/utl_compress-gzip-and-zlib/
* ZIP_UTIL_PKG

##Generate and parse CSV files using PL/SQL
Expand Down Expand Up @@ -250,8 +250,8 @@ This library is a collection of various utility packages for PL/SQL, as well as

##Miscellaneous utilities and demos

* http://www.toadworld.com/Portals/0/stevenf/demo.zip
* http://www.toadworld.com/ORACLE/StevenFeuersteinsPLSQLObsession/tabid/153/Default.aspx
* http://www.oracle.com/webfolder/technetwork/tutorials/plsql/sfdemo.zip
* http://www.toadworld.com/platforms/oracle/w/wiki/8243.plsql-obsession

##PL/SQL Frameworks

Expand All @@ -264,7 +264,7 @@ This library is a collection of various utility packages for PL/SQL, as well as

##Unit Testing Frameworks for PL/SQL

* http://sourceforge.net/projects/utplsql/
* https://utplsql.github.io/ (version 3 beta)
* http://code.google.com/p/pluto-test-framework/

##Documentation Generators (JavaDoc-style)
Expand Down
Binary file added alexandria-logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 68 additions & 1 deletion demos/xlsx_builder_pkg_demo.sql
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
-- see http://technology.amis.nl/blog/10995/create-an-excel-file-with-plsql

begin
xlsx_builder_pkg.clear_workbook;
xlsx_builder_pkg.new_sheet;
xlsx_builder_pkg.cell( 5, 1, 5 );
xlsx_builder_pkg.cell( 3, 1, 3 );
xlsx_builder_pkg.cell( 2, 2, 45 );
xlsx_builder_pkg.cell( 3, 2, 'Anton Scheffer', p_alignment => xlsx_builder_pkg.get_alignment( p_wraptext => true ) );
xlsx_builder_pkg.cell( 1, 4, sysdate );
xlsx_builder_pkg.cell( 1, 4, sysdate, p_fontId => xlsx_builder_pkg.get_font( 'Calibri', p_rgb => 'FFFF0000' ) );
xlsx_builder_pkg.cell( 2, 4, sysdate, p_numFmtId => xlsx_builder_pkg.get_numFmt( 'dd/mm/yyyy h:mm' ) );
xlsx_builder_pkg.cell( 3, 4, sysdate, p_numFmtId => xlsx_builder_pkg.get_numFmt( xlsx_builder_pkg.orafmt2excel( 'dd/mon/yyyy' ) ) );
xlsx_builder_pkg.cell( 5, 5, 75, p_borderId => xlsx_builder_pkg.get_border( 'double', 'double', 'double', 'double' ) );
Expand All @@ -33,5 +34,71 @@ begin
end;
/

-- Create an Excel file with validation
begin
xlsx_builder_pkg.clear_workbook;
xlsx_builder_pkg.new_sheet;
xlsx_builder_pkg.cell( 1, 6, 5 );
xlsx_builder_pkg.cell( 1, 7, 3 );
xlsx_builder_pkg.cell( 1, 8, 7 );
xlsx_builder_pkg.new_sheet;
xlsx_builder_pkg.cell( 2, 6, 15, p_sheet => 2 );
xlsx_builder_pkg.cell( 2, 7, 13, p_sheet => 2 );
xlsx_builder_pkg.cell( 2, 8, 17, p_sheet => 2 );
xlsx_builder_pkg.list_validation( 6, 3, 1, 6, 1, 8, p_show_error => true, p_sheet => 1 );
xlsx_builder_pkg.defined_name( 2, 6, 2, 8, 'Anton', 2 );
xlsx_builder_pkg.list_validation
( 6, 1, 'Anton'
, p_style => 'information'
, p_title => 'valid values are'
, p_prompt => '13, 15 and 17'
, p_show_error => true
, p_error_title => 'Are you sure?'
, p_error_txt => 'Valid values are: 13, 15 and 17'
, p_sheet => 1 );
xlsx_builder_pkg.save( 'MY_DIR', 'my.xlsx' );
end;
/


begin
xlsx_builder_pkg.clear_workbook;
xlsx_builder_pkg.new_sheet;
xlsx_builder_pkg.cell( 1, 6, 5 );
xlsx_builder_pkg.cell( 1, 7, 3 );
xlsx_builder_pkg.cell( 1, 8, 7 );
xlsx_builder_pkg.set_autofilter( 1,1, p_row_start => 5, p_row_end => 8 );
xlsx_builder_pkg.new_sheet;
xlsx_builder_pkg.cell( 2, 6, 5 );
xlsx_builder_pkg.cell( 2, 7, 3 );
xlsx_builder_pkg.cell( 2, 8, 7 );
xlsx_builder_pkg.set_autofilter( 2,2, p_row_start => 5, p_row_end => 8 );
xlsx_builder_pkg.save( 'MY_DIR', 'my.xlsx' );
end;
/

-- Create workbook with frozen cells
begin
xlsx_builder_pkg.clear_workbook;
xlsx_builder_pkg.new_sheet;
for c in 1 .. 10
loop
xlsx_builder_pkg.cell( c, 1, 'COL' || c );
xlsx_builder_pkg.cell( c, 2, 'val' || c );
xlsx_builder_pkg.cell( c, 3, c );
end loop;
xlsx_builder_pkg.freeze_rows( 1 );
xlsx_builder_pkg.new_sheet;
for r in 1 .. 10
loop
xlsx_builder_pkg.cell( 1, r, 'ROW' || r );
xlsx_builder_pkg.cell( 2, r, 'val' || r );
xlsx_builder_pkg.cell( 3, r, r );
end loop;
xlsx_builder_pkg.freeze_cols( 3 );
xlsx_builder_pkg.new_sheet;
xlsx_builder_pkg.cell( 3, 3, 'Start freeze' );
xlsx_builder_pkg.freeze_pane( 3,3 );
xlsx_builder_pkg.save( 'MY_DIR', 'my.xlsx' );
end;
/
2 changes: 2 additions & 0 deletions doc/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

NOTE: This changelog is no longer being maintained. See the Git changelog for an up-to-date list of changes.

Version 1.7.1
=============

Expand Down
Loading

0 comments on commit dc3fac1

Please sign in to comment.