title: Create an Excel File (.xlsx) using PL/SQL
body: <p>In relation to my previous question <a href="https://stackoverflow.com/questions/41281665/return-the-sql-statement-of-an-explicit-cursor">Return the SQL Statement of an Explicit Cursor</a>,
  i was able to generate an Excel <code>(.xls)</code> file using <code>DBMS_SQL</code> and <code>UTL_FILE</code> and passing a <code>SYS_REFCURSOR</code> (code is in the previous question). 
  However, one challenge i'm encountering is the generated file is over 25 MB. 
  I will be transmitting this over Email to Business Users and it would surely fill up their mailbox size.
  When I do manual extracts to <code>xlsx</code> using <code>SQL Developer</code> it just generates around 4 MB of data.</p>
  
  <p>To Address this, would it be possible through <code>PL/SQL</code> to do the following?</p>
  
  <ol>
  <li>Generate a file using a later version of Excel (<code>.xlsx</code>) to compress the size</li>
  <li>Compress the <code>.xls</code> file before transmitting</li>
  </ol>
  
  <p>I've also reviewed similar posts here in SO such as <a href="https://stackoverflow.com/questions/8414050/writing-in-excelsheet-using-utl-file-package-in-oracle">Writing in ExcelSheet using UTL_FILE package in Oracle</a>,
  but as the answer stated, it needs to use Java. So its not applicable to me.
  Another post, <a href="https://stackoverflow.com/questions/6017863/create-an-excel-spreadsheet-from-a-oracle-database">Create an Excel Spreadsheet from a Oracle Database</a>, is also using <code>xls</code>. So its not applicable as well.</p>
  
  <p>Any thoughts?</p>
  
  <p>Oracle Version:</p>
  
  <pre><code>Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
  PL/SQL Release 11.2.0.4.0 - Production
  "CORE   11.2.0.4.0  Production"
  TNS for Solaris: Version 11.2.0.4.0 - Production
  NLSRTL Version 11.2.0.4.0 - Production
  </code></pre>