Examples of CellValue


Examples of org.apache.poi.ss.usermodel.CellValue

    if (cell == null) {
      return null;
    }
    XSSFCell result = (XSSFCell) cell;
    if (cell.getCellType() == XSSFCell.CELL_TYPE_FORMULA) {
      CellValue cv = evaluateFormulaCellValue(cell);
      setCellType(cell, cv); // cell will no longer be a formula cell
      setCellValue(cell, cv);
    }
    return result;
  }
View Full Code Here

Examples of org.apache.poi.ss.usermodel.CellValue

        }

    ValueEval eval = _bookEvaluator.evaluate(new XSSFEvaluationCell((XSSFCell) cell));
    if (eval instanceof NumberEval) {
      NumberEval ne = (NumberEval) eval;
      return new CellValue(ne.getNumberValue());
    }
    if (eval instanceof BoolEval) {
      BoolEval be = (BoolEval) eval;
      return CellValue.valueOf(be.getBooleanValue());
    }
    if (eval instanceof StringEval) {
      StringEval ne = (StringEval) eval;
      return new CellValue(ne.getStringValue());
    }
    if (eval instanceof ErrorEval) {
      return CellValue.getError(((ErrorEval)eval).getErrorCode());
    }
    throw new RuntimeException("Unexpected eval class (" + eval.getClass().getName() + ")");
View Full Code Here

Examples of org.apache.poi.ss.usermodel.FormulaEvaluator.CellValue

    sheet.createRow(32768).createCell((short)0).setCellValue(31);
    sheet.createRow(32769).createCell((short)0).setCellValue(11);
   
    HSSFFormulaEvaluator fe = new HSSFFormulaEvaluator(sheet, wb);
    fe.setCurrentRow(row);
    CellValue result;
    try {
      result = fe.evaluate(cell);
    } catch (FormulaParseException e) {
      if(e.getMessage().equals("Found reference to named range \"A\", but that named range wasn't defined!")) {
        fail("Identifed bug 44539");
      }
      throw new RuntimeException(e);
    }
    assertEquals(HSSFCell.CELL_TYPE_NUMERIC, result.getCellType());
    assertEquals(42.0, result.getNumberValue(), 0.0);
  }
View Full Code Here

Examples of org.drools.guvnor.client.widgets.decoratedgrid.CellValue

            int maxRowIndex = data.size();

            //Add an empty row to the end of the data to simplify detection of merged cells that run to the end of the table
            DynamicDataRow blankRow = new DynamicDataRow();
            for ( int iCol = 0; iCol < COLUMNS; iCol++ ) {
                CellValue cv = new CellValue( null,
                                              maxRowIndex,
                                              iCol );
                blankRow.add( cv );
            }
            data.add( blankRow );
View Full Code Here

Examples of org.drools.guvnor.client.widgets.drools.decoratedgrid.CellValue

            int maxRowIndex = data.size();

            //Add an empty row to the end of the data to simplify detection of merged cells that run to the end of the table
            DynamicDataRow blankRow = new DynamicDataRow();
            for ( int iCol = 0; iCol < COLUMNS; iCol++ ) {
                CellValue cv = new CellValue( null );
                Coordinate c = new Coordinate( data.size(),
                                               iCol );
                cv.setCoordinate( c );
                cv.setHtmlCoordinate( c );
                cv.setPhysicalCoordinate( c );
                blankRow.add( cv );
            }
            data.add( blankRow );
            maxRowIndex++;
View Full Code Here

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

      final VariableResolver resolver = BookHelper.getVariableResolver(book);
      final FunctionMapper mapper = BookHelper.getFunctionMapper(book);
      final XelContext ctx = new SimpleXelContext(resolver, mapper);
      ctx.setAttribute("zkoss.zss.CellType", Object.class);
      XelContextHolder.setXelContext(ctx);
      final CellValue cv = book.getFormulaEvaluator().evaluate(cell);
      //set back into Cell formula record(update value and cachedFormulaResultType)
      setCellValue(cell, cv);
      return cv;
    } finally {
      XelContextHolder.setXelContext(old);
View Full Code Here

Examples of reportgen.ren.report.extendedformat.cell.CellValue

        @Override
        protected void buildRowBody(ColRowRange rowRange, int row, int col)
                throws ReportException {
            //шапка закончена - дорисовываем ячейки
            for(ColRowRange colRange: colsFlat) {
                CellValue cell = format.getCell(colRange, rowRange);
                CellPosition corner = new CellPosition(row, col++);
                initCell(corner, new SheetCell(parent, cell, tableListener));
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.