コード例 #1
0
 public static int getMileCellRows(String sTestCaseName, int colNum, int start, int end)
     throws Exception {
   int i;
   try {
     for (i = start; i < end; i++) {
       if (ExcelUtils.getCellIntData(i, colNum).equalsIgnoreCase(sTestCaseName)) {
         break;
       }
     }
     return i;
   } catch (Exception e) {
     Log.error("Class ExcelUtil | Method getRowContains | Exception desc : " + e.getMessage());
     throw (e);
   }
 }
コード例 #2
0
  public static int getMileRowNumber(int mile, int colNum, int start, int end) throws Exception {
    int rowNo = 0;
    try {

      for (int j = start; j < end; j++) {
        if (mile <= Integer.parseInt(ExcelUtils.getCellIntData(j, colNum))) {
          rowNo = j;
          break;
        }
      }
      return rowNo;
    } catch (Exception e) {
      Log.error("Class ExcelUtil | Method getRowContains | Exception desc : " + e.getMessage());
      throw (e);
    }
  }
コード例 #3
0
 public static int[][] getMileRows(String searchString, int colNum, int start, int end)
     throws Exception {
   int i;
   try {
     int count = 0;
     int[][] arr = new int[1][3];
     for (i = start; i < end; i++) {
       if (ExcelUtils.getCellIntData(i, colNum).equalsIgnoreCase(searchString)) {
         count++;
       }
     }
     arr[0][0] = count;
     arr[0][1] = ExcelUtils.getMileCellRows(searchString, colNum, start, end);
     arr[0][2] = arr[0][1] + count;
     return arr;
   } catch (Exception e) {
     Log.error("Class ExcelUtil | Method getRowContains | Exception desc : " + e.getMessage());
     throw (e);
   }
 }