title: Data Provider Mismatch error in Selenium with TestNG and Java
body: <p>Can you please suggest for the possible cause of the Data provider mismatch error which is coming in case of implementing Excel flow from Selenium Java.</p>
  
  <pre><code>org.testng.internal.reflect.MethodMatcherException: 
  Data provider mismatch
  Method: CreateFlow([Parameter{index=0, type=java.lang.String, declaredAnnotations=[]}, Parameter{index=1, type=java.lang.String, declaredAnnotations=[]}, Parameter{index=2, type=java.lang.String, declaredAnnotations=[]}, Parameter{index=3, type=java.lang.String, declaredAnnotations=[]}, Parameter{index=4, type=java.lang.String, declaredAnnotations=[]}, Parameter{index=5, type=java.lang.String, declaredAnnotations=[]}, Parameter{index=6, type=java.lang.String, declaredAnnotations=[]}, Parameter{index=7, type=java.lang.String, declaredAnnotations=[]}, Parameter{index=8, type=java.lang.String, declaredAnnotations=[]}, Parameter{index=9, type=java.lang.String, declaredAnnotations=[]}, Parameter{index=10, type=java.lang.String, declaredAnnotations=[]}, Parameter{index=11, type=java.lang.String, declaredAnnotations=[]}])
  Arguments: [(org.apache.poi.xssf.usermodel.XSSFCell) AakashAuto,(org.apache.poi.xssf.usermodel.XSSFCell) Dummy,(org.apache.poi.xssf.usermodel.XSSFCell) dummy,(org.apache.poi.xssf.usermodel.XSSFCell) gmaAIL.COM,(org.apache.poi.xssf.usermodel.XSSFCell) asdsad,(org.apache.poi.xssf.usermodel.XSSFCell) sads,(org.apache.poi.xssf.usermodel.XSSFCell) asd,(org.apache.poi.xssf.usermodel.XSSFCell) asd,(org.apache.poi.xssf.usermodel.XSSFCell) Dummy,(org.apache.poi.xssf.usermodel.XSSFCell) Dummy,(org.apache.poi.xssf.usermodel.XSSFCell) Dummy,(org.apache.poi.xssf.usermodel.XSSFCell) asd]
      at org.testng.internal.reflect.DataProviderMethodMatcher.getConformingArguments(DataProviderMethodMatcher.java:45)
      at org.testng.internal.Parameters.injectParameters(Parameters.java:796)
      at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:983)
      at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
      at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
      at org.testng.TestRunner.privateRun(TestRunner.java:648)
      at org.testng.TestRunner.run(TestRunner.java:505)
      at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
      at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
      at org.testng.SuiteRunner.run(SuiteRunner.java:364)
      at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
      at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
      at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
      at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
      at org.testng.TestNG.runSuites(TestNG.java:1049)
      at org.testng.TestNG.run(TestNG.java:1017)
      at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
      at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
      at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
  </code></pre>
  
  <p><strong>Code which I am using to get the Data from Excel:</strong></p>
  
  <pre><code>    public static Object[][] TestData() {
  Workbook workBook;
      Sheet sheet;           
  File src = new File(FilePath);
          workBook = WorkbookFactory.create(src); 
  sheet = book.getSheetAt(0);
              int rowCount = sheet.getLastRowNum();
              int cellCount = sheet.getRow(0).getLastCellNum();
              Object[][] data = new Object[rowCount][cellCount];
              for (int i = 0; i &lt; rowCount; i++) {[![enter image description here][1]][1]
                  for (int j = 0; j &lt; cellCount; j++) {
                      data[i][j] = sheet.getRow(1).getCell(j);
                  }
              }
              return data;
          }
  </code></pre>
  
  <p>Method where I am calling this TestData:</p>
  
  <pre><code>@DataProvider
      public Object[][] getData() {
          Object[][] data = TestUtil.TestData();
          return data;
      }
  
  @Test(dataProvider = "getData")
  public void CreateFlow(String firstName, String lastName, String address, String email, String DOB,
                  String MobileNumber, String HomeNumber, String PIN, String id, String secondID, String AccountID,
                  String number) throws IOException, InterruptedException {
      //Printing all these values inside this method
          }
  </code></pre>