title: Retrieve values from excel using poi
body: <p>I am trying to get the column values for a specific row in a excel using poi methods.</p>
  
  <p>I am able to get the values but the problem is I want the values only from second column. </p>
  
  <pre><code>public static ArrayList&lt;String&gt; GetBusinessComponentList() throws IOException{
  
  
          String Tcname = "TC02_AggregateAutoByPassRO_CT";
          ArrayList&lt;String&gt; arrayListBusinessFlow ;   
          arrayListBusinessFlow = new ArrayList&lt;String&gt;();
          FileInputStream fileInput = new FileInputStream(oFile);
          wb = new HSSFWorkbook(fileInput);
          sheet = wb.getSheet("Business Flow");
  
          int rownr = findRow(sheet, Tcname);
              row = sheet.getRow(rownr);  
                                            for (Cell cell : row) {
                                          String arr = cell.getStringCellValue();                  
                        arrayListBusinessFlow.add(arr);         
                      }                               
                    return arrayListBusinessFlow;
          }
      private static int findRow(HSSFSheet sheet, String cellContent){              
  
          for (Row row : sheet) {
              for (Cell cell : row) {
                  if (cell.getCellType() == Cell.CELL_TYPE_STRING) {
                      if (cell.getRichStringCellValue().getString().trim().equals(cellContent)) {
                          return row.getRowNum();  
                      }
                  }
              }
          }               
          return 0;
      }
  
  }
  </code></pre>
  
  <p><strong>OUTPUT:</strong> </p>
  
  <pre><code>[TC02_AggregateAutoByPassRO_CT, 
  StrategicUINewBusiness.Login, 
  StrategicUINewBusiness.CustomerSearch, 
  StrategicUINewBusiness.NamedInsured, 
  StrategicUINewBusiness.InsuranceScoreByPass, 
  StrategicUINewBusiness.VehiclePage, 
  StrategicUINewBusiness.DriverPage, 
  StrategicUINewBusiness.ViolationPage, 
  StrategicUINewBusiness.UnderwritingPage, 
  StrategicUINewBusiness.CoveragePage, 
  StrategicUINewBusiness.Portfolio, 
  StrategicUINewBusiness.BillingPage, 
  StrategicUINewBusiness.FinalSalePage, 
  StrategicUINewBusiness.PolicyConfirmation, , , ]
  </code></pre>
  
  <p>But I do not want my test case name when I am getting.</p>
  
  <p>Please help me what changes i needed to do. thanks!</p>