Returns the new {@link CellValue} from provided {@link Cell}.
423240
public static ICellValue resolveCellValue(Cell c) {
        if (c == null) { return CellValue.BLANK; }
        
        switch (c.getCellType()) {
            case CELL_TYPE_NUMERIC: { return CellValue.from(c.getNumericCellValue()); }
            case CELL_TYPE_STRING: { return CellValue.from(c.getStringCellValue()); }
            case CELL_TYPE_BOOLEAN: { return CellValue.from(c.getBooleanCellValue()); }
            case CELL_TYPE_ERROR: { return CellValue.from(forInt(c.getErrorCellValue()).getString()); }
            case CELL_TYPE_BLANK: { return CellValue.BLANK; }
            case CELL_TYPE_FORMULA: { return CellValue.from(String.format("%s%s", FORMULA_PREFIX, c.getCellFormula())); }
            default: { throw new CalculationEngineException(String.format("Cell's type %s is not supported.", c.getCellType())); }
        }
    }
223524
public static CellModel getCellModel(JspContext jspContext) {
        Object model = jspContext.getAttribute(KEY_CELL_MODEL);
        assert model != null ? model instanceof CellModel : true;
        return (CellModel)model;
    }
331273
public static CellPosition of(final Cell cell) {
        ArgUtils.notNull(cell, "cell");

        return of(cell.getRowIndex(), cell.getColumnIndex());
    }
6048
public static function fromCell($cell)
    {
        switch (Cell::toValue($cell)) {
            case null:
                return null;
            case Cell::SMALL:
                return self::SMALL();
            case Cell::TALL_TOP:
                return self::TALL();
            case Cell::WIDE_LEFT:
                return self::WIDE();
            default:
                return false;
        }
    }
772111
function (start, end) {
      var fnCellValue = instance.custom.cellValue,
          coordsStart = instance.utils.cellCoords(start),
          coordsEnd = instance.utils.cellCoords(end),
          element = this;

      // iterate cells to get values and indexes
      var cells = instance.utils.iterateCells.call(this, coordsStart, coordsEnd),
          result = [];

      // check if custom cellValue fn exists
      if (instance.utils.isFunction(fnCellValue)) {

        var cellId = instance.utils.translateCellCoords({row: element.row, col: element.col});

        //update dependencies
        instance.matrix.updateItem(cellId, {deps: cells.index});

      } else {

        //update dependencies
        instance.matrix.updateElementItem(element, {deps: cells.index});
      }

      result.push(cells.value);
      return result;
    }
580012
public static Object getCellValue(Cell cell, CellType cellType, CellEditor cellEditor) {
		if (null == cell) {
			return null;
		}
		if (null == cellType) {
			cellType = cell.getCellTypeEnum();
		}

		Object value;
		switch (cellType) {
		case NUMERIC:
			value = getNumericValue(cell);
			break;
		case BOOLEAN:
			value = cell.getBooleanCellValue();
			break;
		case FORMULA:
			// 遇到公式时查找公式结果类型
			value = getCellValue(cell, cell.getCachedFormulaResultTypeEnum(), cellEditor);
			break;
		case BLANK:
			value = StrUtil.EMPTY;
			break;
		case ERROR:
			final FormulaError error = FormulaError.forInt(cell.getErrorCellValue());
			value = (null == error) ? StrUtil.EMPTY : error.getString();
			break;
		default:
			value = cell.getStringCellValue();
		}

		return null == cellEditor ? value : cellEditor.edit(cell, value);
	}
1239197
public Cell<C, T> row() {
        if (cells.size() > 0)
            endRow();
        if (rowDefaults != null)
            toolkit.freeCell(rowDefaults);
        rowDefaults = toolkit.obtainCell(this);
        rowDefaults.clear();
        return rowDefaults;
    }
101908
public static ICellValue resolveCellValue(org.apache.poi.ss.usermodel.CellValue cellval) {
        if (cellval == null) { return CellValue.BLANK; }

        switch (cellval.getCellType()) {
            case CELL_TYPE_NUMERIC: { return CellValue.from(cellval.getNumberValue()); }
            case CELL_TYPE_STRING: { return CellValue.from(cellval.getStringValue()); }
            case CELL_TYPE_BOOLEAN: { return CellValue.from(cellval.getBooleanValue()); }
            case CELL_TYPE_ERROR: { return CellValue.from(ErrorEval.valueOf(cellval.getErrorValue()).getErrorString()); }
            case CELL_TYPE_BLANK: { return CellValue.BLANK; }
            case CELL_TYPE_FORMULA: { throw new CalculationEngineException("Result of evaluation cannot be a formula."); }
            default: { throw new CalculationEngineException(String.format("CellValue's tType %s is not supported.", cellval.getCellType())); }
        }
    }
46324
public boolean add(Cell c) {
        if (c == null) {
            throw new DeepGenericException(new IllegalArgumentException("cell parameter cannot be null"));
        }

        return getCellsByTable(nameSpace).add(c);
    }
726787
public DTCellValue52 cloneDefaultValueCell() {
        DTCellValue52 cloned = new DTCellValue52();
        cloned.valueBoolean = valueBoolean;
        cloned.valueDate = valueDate;
        cloned.valueNumeric = valueNumeric;
        cloned.valueString = valueString;
        cloned.dataType = dataType;
        return cloned;
    }
562665
public Cell createCell(Object obj) {

        Cell cell = this.getNextCell(CellType.STRING);
        cell.setCellValue(String.valueOf(obj));
        cell.setCellStyle(this.style.getStringCs());
        return cell;
    }
1323382
private void initSelectCell(final A_CmsSelectCell cell) {

        cell.registerDomHandler(new ClickHandler() {

            /**
             * @see com.google.gwt.event.dom.client.ClickHandler#onClick(com.google.gwt.event.dom.client.ClickEvent)
             */
            public void onClick(ClickEvent e) {

                onValueSelect(cell.getValue());
                cell.removeStyleName(CSS.selectHover());
            }
        }, ClickEvent.getType());

        cell.registerDomHandler(new MouseOverHandler() {

            /**
             * @see com.google.gwt.event.dom.client.MouseOverHandler#onMouseOver(com.google.gwt.event.dom.client.MouseOverEvent)
             */
            public void onMouseOver(MouseOverEvent e) {

                cell.addStyleName(CSS.selectHover());

            }
        }, MouseOverEvent.getType());

        cell.registerDomHandler(new MouseOutHandler() {

            /**
             * @see com.google.gwt.event.dom.client.MouseOutHandler#onMouseOut(com.google.gwt.event.dom.client.MouseOutEvent)
             */
            public void onMouseOut(MouseOutEvent e) {

                cell.removeStyleName(CSS.selectHover());
            }
        }, MouseOutEvent.getType());
    }
1259427
public Cell createCell(String str) {

        Cell cell = this.getNextCell(CellType.STRING);
        cell.setCellValue(str);
        cell.setCellStyle(this.style.getStringCs());
        return cell;
    }
1045681
public static Row getRowFromCells(Cells cells) {
        Object[] values = cells.getCellValues().toArray();
        return RowFactory.create(values);
    }
1203108
private Column createColumnFromCell(Sheet sheet, Cell cell) {
    if (cell.getCellTypeEnum() == CellType.STRING) {
      return Column.create(
          cell.getStringCellValue(),
          cell.getColumnIndex(),
          getColumnDataFromSheet(sheet, cell.getColumnIndex()));
    } else {
      throw new MolgenisDataException(
          String.format(
              "Celltype [%s] is not supported for columnheaders", cell.getCellTypeEnum()));
    }
  }
226501
public Object getCellEditorValue()
    {
        boolean bValue = this.isSelected();
        if (bValue)
            return Boolean.TRUE.toString();
        else
            return Boolean.FALSE.toString();
    }
1108209
public void newCell(final int row,
            final int column,
            final String value,
            final int mergedColStart) {
        if ( emptyCellValue( value ) ) {
            return;
        }
        final Integer rowInt = new Integer( row );
        if ( this._rowProperties.containsKey( rowInt ) ) {
            final String[] keyValue = (String[]) this._rowProperties.get( rowInt );
            if ( PropertiesSheetListener.EMPTY_STRING.equals( keyValue[1] ) ) {
                keyValue[1] = value;
                keyValue[2] = RuleSheetParserUtil.rc2name(row, column);
            }
        } else {
            final String trimmedValue = value.trim();
            final String[] keyValue = {trimmedValue, PropertiesSheetListener.EMPTY_STRING, RuleSheetParserUtil.rc2name(row, column+1) };
            this._rowProperties.put( rowInt, keyValue );
        }
    }