title: Store dataprovider parameters as array in test method in testng
body: <p>I am writing excel data to an array and returning the same via @dataprovider. Code looks something like this-</p>
  
  <pre><code>for(i=0;i&lt;numrow+1;i++){
        for (j=0;j&lt;numcol;j++ ){
            if(xlsh.getRow(i).getCell(j)!=null){
                xldata[i][j]=xlsh.getRow(i).getCell(j).toString();
            }
            else{
                xldata[i][j]="";
            }
        }
  }
  
  return xldata;
  </code></pre>
  
  <p>The excel I am reading has about 40 columns and I want to write the same to an array in my @test method. So I tried using below code in my @test method to read the data provided by @dataprovider</p>
  
  <pre><code>@Test(dataProvider = "name")
  public void mymethod(String[] fromxl) {
   //code
  }
  </code></pre>
  
  <p>But somehow array isn't recognized as an array and I am getting error saying - dataprovider has 40 parameters, but test method accepts only 1.
  Now if I change the array to 40 different parameters in my test method (sample code below), it seems to be working. But I don't want to do this as this is cumbersome. Any reason why I can't make the array to work in my test method ? Appreciate any help/pointers on this</p>
  
  <pre><code>@Test(dataProvider = "name")
  public void mymethod(String data1, .. , String data40) {
   //code
  }
  </code></pre>