Examples of FormulaRecord


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

                (( BlankRecord ) record).setRow(row);
                (( BlankRecord ) record).setXFIndex(( short ) 0);
                break;

            case CELL_TYPE_FORMULA :
                FormulaRecord formulaRecord = new FormulaRecord();
                record = new FormulaRecordAggregate(formulaRecord,null);
                formulaRecord.setColumn(col);
                formulaRecord.setRow(row);
                formulaRecord.setXFIndex(( short ) 0);
            case CELL_TYPE_BOOLEAN :
                record = new BoolErrRecord();
                (( BoolErrRecord ) record).setColumn(col);
                (( BoolErrRecord ) record).setRow(row);
                (( BoolErrRecord ) record).setXFIndex(( short ) 0);
View Full Code Here

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

            case CELL_TYPE_FORMULA :
                FormulaRecordAggregate frec = null;

                if (cellType != this.cellType)
                {
                    frec = new FormulaRecordAggregate(new FormulaRecord(),null);
                }
                else
                {
                    frec = ( FormulaRecordAggregate ) record;
                }
View Full Code Here

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

                (( BlankRecord ) record).setRow(row);
                (( BlankRecord ) record).setXFIndex(( short ) 0);
                break;

            case CELL_TYPE_FORMULA :
                record = new FormulaRecord();
                (( FormulaRecord ) record).setColumn(col);
                (( FormulaRecord ) record).setRow(row);
                (( FormulaRecord ) record).setXFIndex(( short ) 0);
            case CELL_TYPE_BOOLEAN :
                record = new BoolErrRecord();
View Full Code Here

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

        }
        switch (cellType)
        {

            case CELL_TYPE_FORMULA :
                FormulaRecord frec = null;

                if (cellType != this.cellType)
                {
                    frec = new FormulaRecord();
                }
                else
                {
                    frec = ( FormulaRecord ) record;
                }
                frec.setColumn(getCellNum());
                if (setValue)
                {
                    frec.setValue(getNumericCellValue());
                }
                frec.setXFIndex(( short ) cellStyle.getIndex());
                frec.setRow(row);
                record = frec;
                break;

            case CELL_TYPE_NUMERIC :
                NumberRecord nrec = null;
View Full Code Here

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

                (( BlankRecord ) record).setRow(row);
                (( BlankRecord ) record).setXFIndex(( short ) 0);
                break;

            case CELL_TYPE_FORMULA :
                record = new FormulaRecord();
                (( FormulaRecord ) record).setColumn(col);
                (( FormulaRecord ) record).setRow(row);
                (( FormulaRecord ) record).setXFIndex(( short ) 0);
            case CELL_TYPE_BOOLEAN :
                record = new BoolErrRecord();
View Full Code Here

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

        }
        switch (cellType)
        {

            case CELL_TYPE_FORMULA :
                FormulaRecord frec = null;

                if (cellType != this.cellType)
                {
                    frec = new FormulaRecord();
                }
                else
                {
                    frec = ( FormulaRecord ) record;
                }
                frec.setColumn(getCellNum());
                if (setValue)
                {
                    frec.setValue(getNumericCellValue());
                }
                frec.setXFIndex(( short ) cellStyle.getIndex());
                frec.setRow(row);
                record = frec;
                break;

            case CELL_TYPE_NUMERIC :
                NumberRecord nrec = null;
View Full Code Here

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

      ((FormulaRecordAggregate)cvRec).notifyFormulaChanging();
    }
    _valuesAgg.removeCell(cvRec);
  }
  public FormulaRecordAggregate createFormula(int row, int col) {
    FormulaRecord fr = new FormulaRecord();
    fr.setRow(row);
    fr.setColumn((short) col);
    return new FormulaRecordAggregate(fr, null, _sharedValueManager);
  }
View Full Code Here

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

        }
        int sheetIndex = _book.getSheetIndex(_sheet);
        Ptg[] ptgs = HSSFFormulaParser.parse(formula, _book, FormulaType.CELL, sheetIndex);
        setCellType(CELL_TYPE_FORMULA, false, row, col, styleIndex);
        FormulaRecordAggregate agg = (FormulaRecordAggregate) _record;
        FormulaRecord frec = agg.getFormulaRecord();
        frec.setOptions((short) 2);
        frec.setValue(0);

        //only set to default if there is no extended format index already set
        if (agg.getXFIndex() == (short)0) {
            agg.setXFIndex((short) 0x0f);
        }
View Full Code Here

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

            default:
                throw typeMismatch(CELL_TYPE_NUMERIC, _cellType, false);
            case CELL_TYPE_FORMULA:
                break;
        }
        FormulaRecord fr = ((FormulaRecordAggregate)_record).getFormulaRecord();
        checkFormulaCachedValueType(CELL_TYPE_NUMERIC, fr);
        return fr.getValue();
    }
View Full Code Here

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

            case CELL_TYPE_NUMERIC:
                return ((NumberRecord)_record).getValue() != 0;

            case CELL_TYPE_FORMULA:
                // use cached formula result if it's the right type:
                FormulaRecord fr = ((FormulaRecordAggregate)_record).getFormulaRecord();
                checkFormulaCachedValueType(CELL_TYPE_BOOLEAN, fr);
                return fr.getCachedBooleanValue();
            // Other cases convert to false
            // These choices are not well justified.
            case CELL_TYPE_ERROR:
            case CELL_TYPE_BLANK:
                return false;
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.