title: C# NUnit 3 Data Driven from Excel
body: <p>Hello I have the following file: testexcel.xlsx > sheet 1</p>
  
  <p><a href="https://i.stack.imgur.com/9Gd3m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9Gd3m.png" alt="enter image description here"></a></p>
  
  <p>I want to execute this test twice as there are 2 rows with data. </p>
  
  <pre><code>[Test]
  [TestCaseSource("Data")]
  public void Login(String username, String password)
  {
      loginPageModel.DoLogin(username, password);
  }
  </code></pre>
  
  <p>How can I convert that excel data into this kind of data as explained in <a href="https://github.com/nunit/docs/wiki/TestCaseSource-Attribute" rel="nofollow noreferrer">NUnit 3 official documentation</a>?</p>
  
  <pre><code>static object[] Data = {
          new object[] {username, password}
      };
  </code></pre>