title: Read Excel header and row value
body: <p>I would need to read the excel content which has header and N.of rows.
  Based on column header input,the row needs to be extracted in JAVA.</p>
  
  <p>the java code which i has reads the full excel content.</p>
  
  <pre><code>        //Create Workbook instance holding reference to .xlsx file
          XSSFWorkbook workbook = new XSSFWorkbook(file);
  
          //Get first/desired sheet from the workbook
          XSSFSheet sheet = workbook.getSheetAt(0);
          int totalRows = sheet.getPhysicalNumberOfRows();
  
  
          //Iterate through each rows one by one
          Iterator&lt;Row&gt; rowIterator = sheet.iterator();
          while (rowIterator.hasNext())
          {
              Row row = rowIterator.next();
              //For each row, iterate through all the columns
              Iterator&lt;Cell&gt; cellIterator = row.cellIterator();
  
              while (cellIterator.hasNext()) 
              {
                  Cell cell = cellIterator.next();
                  //Check the cell type and format accordingly
                  switch (cell.getCellType()) 
                  {
                      case Cell.CELL_TYPE_NUMERIC:
                          System.out.print(cell.getNumericCellValue() + "\t");
                          break;
                      case Cell.CELL_TYPE_STRING:
                          System.out.print(cell.getStringCellValue() + "\t");
                          break;
                  }
              }
              System.out.println("");
  </code></pre>
  
  <p>Excel content</p>
  
  <pre><code>Coln1 Coln2 Coln3 Coln4 
  A        12   nice  3e
  A        23   talk  s2
  A        43   res   23
  B        11   xl    34
  B        88   out   r45
  C        45    tr    h5
  </code></pre>
  
  <p>EXPECTED result</p>
  
  <pre><code>if (Coln1==B)
  {
  
  Loop the list of B rows (here its 2 rows)
  Coln1 Coln2 Coln3 Coln4 
  B        11   xl    34
  B        88   out   r45
  
  if i need , r45 , How to pass the row cell to get the value?
  
  }
  </code></pre>
  
  <p>can someone please assist. Thanks</p>