title: ADODB reordset value extraction very slow
body: <p>I load an sql table from server to excel to ADODB.recordset.
  Then I want to populate my spreadsheet from that table.
  I need the columns to be in a specific place, so I used the following code to do so.</p>
  
  <pre><code>Dim header As Range
  Set header = sh.Range("A1").Resize(1, sh.Range("A1").End(xlToRight).Column)
  
  i = 1
  Do Until rs.EOF
      For j = 1 To header.Columns.Count
          header.Cells(1, j).Offset(i, 0).Value = rs.Fields.item(header.Cells(1, j).Value)
      Next j
      rs.MoveNext
      i = i + 1
  Loop
  rs.Close
  Set rs = Nothing
  Next s
  </code></pre>
  
  <p>The sheet gets populated, but it takes really long time. My table has 20 columns and 700 rows and the whole process takes minutes to finish.
  I tried populating the sheet with a constant instead and the process finished after approx. one second. So I guess there is something wrong with the line</p>
  
  <pre><code>header.Cells(1, j).Offset(i, 0).Value = rs.Fields.item(header.Cells(1, j).Value)
  </code></pre>
  
  <p>Could anyone suggest, why my code runs so slow and how to improve the speed?</p>