title: How to store data to Excel from DataSet without going cell-by-cell?
body: <p><strong>Duplicate of</strong>: <a href="https://stackoverflow.com/questions/524559/whats-the-simplest-way-to-import-a-system-data-dataset-into-excelb">What’s the simplest way to import a System.Data.DataSet into Excel?</a></p>
  
  <p>Using c# under VS2008, we can create an excel app, workbook, and then worksheet fine by doing this:</p>
  
  <pre><code>Application excelApp = new Application();
  Workbook excelWb = excelApp.Workbooks.Add(template);
  Worksheet excelWs = (Worksheet)this.Application.ActiveSheet;
  </code></pre>
  
  <p>Then we can access each cell by "excelWs.Cells[i,j]" and write/save without problems.  However with large numbers of rows/columns, we are expecting a loss in efficiency.</p>
  
  <p>Is there a way to "data bind" from a DataSet object into the worksheet without using the cell-by-cell approach?  Most of the methods we have seen at some point revert to the cell-by-cell approach.  Thanks for any suggestions.</p>