title: Fastest way to write cells to Excel with Office Interop?
body: <p>I am writing a function to export data to Excel using the Office Interop in VB .NET.  I am currently writing the cells directly using the Excel worksheet's Cells() method:</p>
  
  <pre><code>worksheet.Cells(rowIndex, colIndex) = data(rowIndex)(colIndex)
  </code></pre>
  
  <p>This is taking a long time for large amounts of data.  Is there a faster way to write a lot of data to Excel at once?  Would doing something with ranges be faster?</p>