title: What is the Most Efficient Way to Append Several Lines to Excel Table Using VBA?
body: <p>I am parsing an XML file and choosing/assigning values to a custom class list.  What I'm doing now is looping through the list to append to an Excel table (listobject).  Here is a simplified example:</p>
  
  <pre><code>Private employee as New employee_Class
  
  ...
  
  ProcessXML()
  
  employee.GoToFirst    
  
  Do  
    Set newRow = myTable.ListRows.Add
    Intersect(newRow.Range, myTable.ListColumns("FirstName").Range).value = employee.FirstName
    Intersect(newRow.Range, myTable.ListColumns("LastName").Range).value = employee.LastName
  
    '... (etc., etc.)
  
    employee.Next
  
  Loop Until employee.EOF
  </code></pre>
  
  <p>I've gotten it to work.  Looping through a dozen employees is feasible, but when I have 400 or 1000 employees, it takes several minutes.  I imagine it would be a lot faster to append to a run-time (non-visible) listobject and then append the run-time listobject (as a whole) to my table, but I don't know how to do that.</p>
  
  <p>Secondly, I'm not sure if using Intersect is the most efficient way of appending values by column names.</p>
  
  <p>Reading over 20,000 XML nodes takes a split second, but writing it (about 400-500 rows) takes about 5-10 minutes.  I'm not so much concerned about syntax as I am about technique.  Does anyone have a faster, more efficient technique for appending hundreds of rows to an Excel Table (ListObject)?  Thanks in advance.</p>