Package org.apache.poi.hssf.record

Examples of org.apache.poi.hssf.record.CellValueRecordInterface


            if (currentSheet == null) {
                // Ignore cells outside sheets
            } else if (cell == null) {
                // Ignore empty cells
            } else if (record instanceof CellValueRecordInterface) {
                CellValueRecordInterface value =
                    (CellValueRecordInterface) record;
                Point point = new Point(value.getColumn(), value.getRow());
                currentSheet.put(point, cell);
            }
        }
View Full Code Here


        confirmCachedValue("70164", nc2);
        confirmCachedValue("90210", nc3);

        CellValueRecordInterface[] cvrs = ns.getSheet().getValueRecords();
        for (int i = 0; i < cvrs.length; i++) {
            CellValueRecordInterface cvr = cvrs[i];
            if(cvr instanceof FormulaRecordAggregate) {
                FormulaRecordAggregate fr = (FormulaRecordAggregate)cvr;

                if(i == 0) {
                    assertEquals(70164.0, fr.getFormulaRecord().getValue(), 0.0001);
View Full Code Here

    InternalSheet sheet = InternalSheet.createSheet();

    RowRecord rr = new RowRecord(5);
    sheet.addRow(rr);

    CellValueRecordInterface cvr = new BlankRecord();
    cvr.setColumn((short)0);
    cvr.setRow(5);
    sheet.addValueRecord(5, cvr);


    int dbCellRecordPos = getDbCellRecordPos(sheet);
    if (dbCellRecordPos == 252) {
View Full Code Here

    int thisRow;
    int thisColumn;
    CellValueRecordInterface[] expandedRecords = null;

    if (record instanceof CellValueRecordInterface) {
      CellValueRecordInterface valueRec = (CellValueRecordInterface) record;
      thisRow = valueRec.getRow();
      thisColumn = valueRec.getColumn();
    } else {
      thisRow = -1;
      thisColumn = -1;

      switch (record.getSid()) {
View Full Code Here

     
      // Now check we can turn all the numeric
      //  cells into strings without error
      for(int i=0; i<mockListen._records.size(); i++) {
        Record r = (Record)mockListen._records.get(i);
        CellValueRecordInterface cvr = null;
       
        if(r instanceof NumberRecord) {
          cvr = (CellValueRecordInterface)r;
        }
        if(r instanceof FormulaRecord) {
View Full Code Here

   * starting from startIx.
   */
  private static int countBlanks(CellValueRecordInterface[] rowCellValues, int startIx) {
    int i = startIx;
    while(i < rowCellValues.length) {
      CellValueRecordInterface cvr = rowCellValues[i];
      if (!(cvr instanceof BlankRecord)) {
        break;
      }
      i++;
    }
View Full Code Here

      CellValueRecordInterface[] rowCells = records[i];
      if (rowCells == null) {
        continue;
      }
      for (int j = 0; j < rowCells.length; j++) {
        CellValueRecordInterface cell = rowCells[j];
        if (cell instanceof FormulaRecordAggregate) {
          FormulaRecord fr = ((FormulaRecordAggregate)cell).getFormulaRecord();
          Ptg[] ptgs = fr.getParsedExpression(); // needs clone() inside this getter?
          if (shifter.adjustFormula(ptgs, currentExternSheetIndex)) {
            fr.setParsedExpression(ptgs);
View Full Code Here

      CellValueRecordInterface[] rowCells = records[rowIx];
      if (rowCells == null) {
        continue;
      }
      for (int colIx = 0; colIx < rowCells.length; colIx++) {
        CellValueRecordInterface cell = rowCells[colIx];
        if (cell != null) {
          temp.add(cell);
        }
      }
    }
View Full Code Here

    constructValueRecord(records);
    CellValueRecordInterface[] cvrs = valueRecord.getValueRecords();
    //Ensure that the SharedFormulaRecord has been converted
    assertEquals(1, cvrs.length);

    CellValueRecordInterface record = cvrs[0];
    assertNotNull( "Row contains a value", record );
    assertTrue( "First record is a FormulaRecordsAggregate", ( record instanceof FormulaRecordAggregate ) );
  }
View Full Code Here

        }

        cells[column]=null;

        if(alsoRemoveRecords) {
            CellValueRecordInterface cval = cell.getCellValueRecord();
            sheet.getSheet().removeValueRecord(getRowNum(), cval);
        }
        if (cell.getColumnIndex()+1 == row.getLastCol()) {
            row.setLastCol(calculateNewLastCellPlusOne(row.getLastCol()));
        }
View Full Code Here

TOP

Related Classes of org.apache.poi.hssf.record.CellValueRecordInterface

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.