title: Embed SQL Data into Excel Table
body: <p>I have an Oracle DB connection that pulls data from the DB into Excel. My only issue is that I want it pulled into a table rather than just dump the data into a sheet. My PivotTable needs to be refreshed based on the Table updating. This is my sample code that works. Is there a property for the QueryTables object that embeds the data into a table? </p>
  
  <pre><code>With ActiveSheet.QueryTables.Add(Connection:=Array(connection),Destination:=Range("A1"))
  
   .Sql = "SELECT * FROM TABLE"
   .FieldNames = True
   .Refresh BackgroundQuery:=False
  End With
  </code></pre>