Esempio n. 1
0
 /**
  * 取得一列的cell
  *
  * @param rowNum 行号
  * @return 一列的cell
  */
 public Cell[] getColCells(int colNum) {
   if (readOnlyWBook == true) {
     return currentSheet.getColumn(colNum);
   } else {
     return wrCurrentSheet.getColumn(colNum);
   }
 }
Esempio n. 2
0
 public static int nextFreeColNumber(WritableSheet sheet) {
   if (sheet == null) return 0;
   int colCount = sheet.getColumns();
   Cell[] cells;
   int i = 0;
   for (; i < colCount; i++) {
     cells = sheet.getColumn(i);
     for (Cell cell : cells) {
       if (cell.getContents() == null || cell.getContents().isEmpty()) return i;
     }
   }
   return i;
 }