Package org.zkoss.poi.ss.usermodel

Examples of org.zkoss.poi.ss.usermodel.Cell


    Worksheet sheet = ((Spreadsheet) comp).getSelectedSheet();
    if (!Utils.getSheetUuid(sheet).equals(sheetId))
      return;
   
    Cell cell = Utils.getCell(sheet, row, col);
    // You can call getEditText(), setEditText(), getText().

    //TODO, Utils.getRichEditText(cell)?
    String editText = cell == null ? "" : Utils.getEditText(cell);
   
View Full Code Here


   
    for (int r = tRow; r <= bRow; r++) {
      Row row = sheet.getRow(r);
      if (row != null) {
        for (int c = lCol; c <= rCol; c++) {
          Cell cell = row.getCell(c);
          if (shtProtect && cell != null && cell.getCellStyle().getLocked()) {
            return true;
          } else if (shtProtect && cell == null) {
            return true;
          }
        } 
View Full Code Here

    final int columnIndex = range.getColumn() + field - 1;
    for (int i = top; i <= bottom; i++) {
      if (nofilter && isHiddenRow(i, worksheet)) {
        continue;
      }
      final Cell c = Utils.getCell(worksheet, i, columnIndex);
      final boolean blankcell = BookHelper.isBlankCell(c);
      if (!blankcell) {
        String displaytxt = BookHelper.getCellText(c);
        Object val = BookHelper.getEvalCellValue(c);
        if (val instanceof RichTextString) {
          val = ((RichTextString)val).getString();
        } else if (c.getCellType() == Cell.CELL_TYPE_NUMERIC && DateUtil.isCellDateFormatted(c)) {
          val = c.getDateCellValue();
        }
        FilterRowInfo rowInfo = new FilterRowInfo(val, displaytxt);
        orderedRowInfos.add(rowInfo);
        if (criteria1 == null || criteria1.isEmpty() || criteria1.contains(displaytxt)) { //selected
          rowInfo.setSelected(true);
View Full Code Here

  /*package*/ static void clearFormulaCache(Book book, Set<Ref> all) {
    if (all != null) {
      for(Ref ref : all) {
        final RefSheet refSheet = ref.getOwnerSheet();
        final Book bookTarget = BookHelper.getBook(book, refSheet);
        final Cell cell = getCell(book, ref.getTopRow(), ref.getLeftCol(), refSheet);
        if (cell != null)
          bookTarget.getFormulaEvaluator().notifySetFormula(cell);
      }
    }
  }
View Full Code Here

    if (last != null) {
      for(Ref ref : last) {
        final RefSheet refSheet = ref.getOwnerSheet();
        //locate the model book and sheet of the refSheet
        final Book bookTarget = BookHelper.getBook(book, refSheet);
        final Cell cell = getCell(book, ref.getTopRow(), ref.getLeftCol(), refSheet);
        if (cell.getCellType() == Cell.CELL_TYPE_FORMULA) {
          evaluate(bookTarget, cell);
        }
      }
    }
  }
View Full Code Here

  public static Cell getOrCreateCell(Worksheet sheet, int rowIndex, int colIndex) {
    Row row = sheet.getRow(rowIndex);
    if (row == null) {
      row = sheet.createRow(rowIndex);
    }
    Cell cell = row.getCell(colIndex);
    if (cell == null) {
      cell = row.createCell(colIndex);
    }
    return cell;
  }
View Full Code Here

      throw new UiException("Unknown cell type:"+cellType);
    }
  }
 
  public static Set<Ref>[] removeCell(Worksheet sheet, int rowIndex, int colIndex) {
    final Cell cell = getCell(sheet, rowIndex, colIndex);
    return removeCell(cell, true);
  }
View Full Code Here

    final Cell cell = getCell(sheet, rowIndex, colIndex);
    return removeCell(cell, true);
  }
 
  public static Set<Ref>[] clearCell(Worksheet sheet, int rowIndex, int colIndex) {
    final Cell cell = getCell(sheet, rowIndex, colIndex);
    return clearCell(cell);
  }
View Full Code Here

  }
 
  //[0]:last, [1]:all
  public static ChangeInfo copyCell(Cell srcCell, Worksheet sheet, int rowIndex, int colIndex, int pasteType, int pasteOp, boolean transpose) {
    //TODO not handle pastType == pasteValidation and pasteOp(assume none)
    final Cell dstCell = getOrCreateCell(sheet, rowIndex, colIndex);
    final Object cellValue = getCellValue(srcCell);
    return copyCell(cellValue, srcCell, dstCell, pasteType, pasteOp, transpose);
  }
View Full Code Here

  }
 
  //[0]:last, [1]:all
  private static ChangeInfo copyCell(Object cellValue, Cell srcCell, Worksheet sheet, int rowIndex, int colIndex, int pasteType, int pasteOp, boolean transpose) {
    //TODO not handle pastType == pasteValidation and pasteOp(assume none)
    final Cell dstCell = getOrCreateCell(sheet, rowIndex, colIndex);
    return copyCell(cellValue, srcCell, dstCell, pasteType, pasteOp, transpose);
  }
View Full Code Here

TOP

Related Classes of org.zkoss.poi.ss.usermodel.Cell

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.