SyntaxHighlighter

Showing posts with label Excel. Show all posts
Showing posts with label Excel. Show all posts

Friday, March 23, 2012

Extending the simple MS Excel procedure to include headers

Oracle 10g
MS Excel
In my previous post titled "Simplest example of writing to MS Excel using an Oracle Stored Procedure", I demonstrated what I believe to be the simplest way of outputting a file that can be used by MS Excel. But the example does not include the column headings.... Okay, thats simple enough. In this post, I will extend on the previous example to include the headings.  So without further ado....

Tuesday, February 28, 2012

Simplest example of writing to MS Excel using an Oracle Stored Procedure

Oracle 10g
MS Excel
First of all, we need to define exactly what is meant by "writing to Excel worksheet". Most people just mean produce something that MS Excel can show as a worksheet. A CSV file is the simplest file that can be displayed by MS Excel and since it is a simple text markup, is the easiest to produce via PL/SQL.

Generating the file using a stored procedure is seriously simple. But you will need to also give thought to how you will make the file available to excel (how to distribute the file). In my example, I make the file available on a network share. The user will find the file available there and open it using MS Excel.