title: C# Excel import data from CSV into Excel
body: <p>How do I import data in Excel from a CSV file using C#? Actually, what I want to achieve is similar to what we do in Excel, you go to the <strong>Data</strong> tab and then select <strong>From Text</strong> option and then use the <strong>Text to columns</strong> option and select CSV and it does the magic, and all that stuff. I want to automate it. </p>
  
  <p>If you could head me in the right direction, I'll really appreciate that.</p>
  
  <p><strong>EDIT:</strong> I guess I didn't explained well. What I want to do is something like</p>
  
  <pre><code>Excel.Application excelApp;
  Excel.Workbook excelWorkbook;
  
  // open excel
  excelApp = new Excel.Application();
  
  // something like
  excelWorkbook.ImportFromTextFile(); // is what I need
  </code></pre>
  
  <p>I want to import that data into Excel, not my own application. As far as I know, I don't think I would have to parse the CSV myself and then insert them in Excel. <strong>Excel does that for us</strong>. I simply need to know how to automate that process.</p>