I am using below code to pass the rows to data provider with flag M, But my test is running for all the rows.
File filpath = new File(FilePath);
FileInputStream ExcelFile = new FileInputStrea(filpath);
ExcelWBook = new XSSFWorkbook(ExcelFile);
ExcelWSheet = ExcelWBook.getSheetAt(0);
int startRow = 1;
int startCol = 0;
int ci, cj;
int totalRows = ExcelWSheet.getLastRowNum();
//System.out.println("total rows in Excel"+ totalRows);
int totalCols = ExcelWSheet.getRow(0).getLastCellNum();
//System.out.println("total columns in Excel"+totalCols);
tabArray = new String[totalRows][totalCols];
for (int k = 1; k < totalRows;)
{
if(EOTdata.ExcelWSheet.getRow(k).getCell(0).getStringCellValue().equalsIgnoreCase("M"))
{
System.out.println(k +" "+EOTdata.ExcelWSheet.getRow(k).getCell(0).getStringCellValue().equalsIgnoreCase("M"));
ci = 0;
for (int i = startRow; i <= totalRows; i++ , ci++) {
cj = 0;
for (int j = startCol; j <totalCols; j++, cj++) { tabArray[ci][cj] = getCellData(i, j);
System.out.println("total array "+ tabArray[ci][cj]);