Guest User

Untitled

a guest
Jan 22nd, 2018
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.73 KB | None | 0 0
  1. /**
  2.      * Creates a list that populates sensor combo boxes
  3.      * @param cellNumber The column to get data from
  4.      * @return sensorList Populates the sensor combo box
  5.      */
  6.     public static List setSensorList(Sheet sheet, int cellNumber) {
  7.  
  8.             int i = 1;
  9.             sensorList.clear();
  10.  
  11.             // A loop to get data from the column until it hits an empty cell
  12.             do {
  13.                 row = sheet.getRow(i);
  14.                 cell = row.getCell(cellNumber);
  15.                 if (cell != null) {
  16.                     sensorList.add(cell.toString());
  17.                     System.out.println(cell);
  18.                 }
  19.                 i++;
  20.             } while (cell != null);
  21.  
  22.         return sensorList;
  23.     }
Add Comment
Please, Sign In to add comment