title: How to export a table to csv or excel format
body: <p>I need to export a oracle table to a csv/excel file format (along with the column headings). A solution through cx_oracle or through sqlplus welcome. </p>
  
  <p>Python code from the comment:</p>
  
  <pre><code>con = cx.connect() 
  cur = con.cursor() 
  printer = cur.execute(sqlcode) 
  con.commit() 
  </code></pre>