title: Inserting data into table via Excel VBA
body: <p>I have an excel table and I am trying to automate the deletion of data and insertion of data into an excel table. </p>
  
  <p>I am using this VBA code to remove my data from my table</p>
  
  <pre><code>Sub Macro2()
      Application.ScreenUpdating = False
      Sheets("Report").Select
      ActiveSheet.ListObjects("Report").HeaderRowRange.Select
      'Remove the filters if one exists.
      If ActiveSheet.FilterMode Then
      Selection.AutoFilter
      End If
  
      With Worksheets("Report").ListObjects("Engagement_report")
          .DataBodyRange.Offset(1).Resize(.DataBodyRange.Rows.Count - 1, .DataBodyRange.Columns.Count).Rows.Delete
          .DataBodyRange.Rows(1).SpecialCells(xlCellTypeConstants).ClearContents
      End With
  
  End Sub
  </code></pre>
  
  <p>However, when i try to insert data(about 11 000 rows) into the same table it is very slow and my excel crashes. I am not sure if its because the resize function i does deletes all rows and hence when i insert data again, it is redoing the range and hence its slow. </p>
  
  <p>Does anyone have any suggestions to help in this?</p>
  
  <p>Appreciate your help</p>