title: Read excel file row by row, cell by cell C#
body: <p>I want (as title states) to programmatically read values from an Excel file. Row by row and then cell by cell, to have the freedom of creating custom collections out of cell's data.</p>
  
  <p>This <a href="https://stackoverflow.com/questions/657131/how-to-read-data-of-an-excel-file-using-c">questions</a> helped me. </p>
  
  <p>But I need more flexible code. Can I for example write (* is just for all columns)</p>
  
  <pre><code>            Range range1 = worksheet.get_Range("*1", Missing.Value)
  
              foreach (Range r in range1)
              {
                  string user = r.Text;
                  string value = r.Value2;
              }
  </code></pre>
  
  <p>And iterate all cells in row 1 as long as there is next.
  There must be some elegant way to iterate through rows and cells in C#.</p>