Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jet.report.xls
Class Formula

    java.lang.Object
      Biff
          jet.report.xls.Blank
              jet.report.xls.Formula

    public class Formula

extends Blank

Specifies a formula cell.

Field Summary
`static short` | `ALWAYSCALC` Specifies whether the formula needs to be calculated during the next recalculation.
`static short` | `CALCONLOAD` Deprecated. it is not used.
`static short` | `SHRFMLA` Deprecated. it is not used.

Constructor Summary
`Formula(int row, int col, int ixfe, double num, short grbit, byte[] rgce)` Constructs a Number record and sets its fields appropriately.
`Formula(int row, int col, int ixfe, double num, short grbit, java.lang.String formulaStr)` Constructs a Number record and sets its fields appropriately.

Method Summary
`java.lang.String` | `getFormulaStr()` Gets formula string.
`int` | `getLength()`
`void` | `input(util.RandomAccessStream stream)` Inputs the class Number from input stream.
`boolean` | `isAlwaysCalc()` Gets whether always to calculate the formula string or not.
`boolean` | `isCalcOnLoad()` Gets whether or not to calculate the formula string when loading it.
`boolean` | `isShrFmla()` Gets whether the formula string is a shared formula or not.
`int` | `opcode()` Gets the opcode of Number.
`int` | `output(util.RandomAccessStream stream)` Outputs the class Number.
`void` | `setAlwaysCalc(boolean b)` Sets whether always to calculate the formula string or not.
`void` | `setCalcOnLoad(boolean b)` Sets whether or not to calculate the formula string when loading it.
`void` | `setFormulaStr(java.lang.String str)` Sets formula string.
`void` | `setShrFmla(boolean b)` Sets whether the formula string is shared formula or not.

Methods inherited from class jet.report.xls.Blank
`getCol, getIxfe, getRow, setCol, setIxfe, setRow`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ALWAYSCALC

    public static final short ALWAYSCALC

  Specifies whether the formula needs to be calculated during the next recalculation.

  See Also:
    Constant Field Values

### CALCONLOAD

    public static final short CALCONLOAD

  Deprecated. it is not used.
  See Also:
    Constant Field Values

### SHRFMLA

    public static final short SHRFMLA

  Deprecated. it is not used.
  See Also:
    Constant Field Values

Constructor Detail

### Formula

    public Formula(int row,
                   int col,
                   int ixfe,
                   double num,
                   short grbit,
                   byte[] rgce)

  Constructs a Number record and sets its fields appropriately.

  Parameters:
    `row` - the row number to locate the formula(based on 0)
    `col` - the column number to locate the formula(based on 0)
    `ixfe` - index to the Xf record
    `num` - the current value of the formula
    `grbit` - option flags, `ALWAYSCALC`
    `rgce` - the byte array to express the formula

### Formula

    public Formula(int row,
                   int col,
                   int ixfe,
                   double num,
                   short grbit,
                   java.lang.String formulaStr)

  Constructs a Number record and sets its fields appropriately.

  Parameters:
    `row` - the row number to locate the formula(based on 0)
    `col` - the column number to locate the formula(based on 0)
    `ixfe` - index to the Xf record
    `num` - the current value of the formula
    `grbit` - option flags, can be ALWAYSCALC, CALCONLOAD, SHRFMLA or the combined value of them
    `formulaStr` - the formula string (refer to excel formula)

Method Detail

### opcode

    public final int opcode()

  Gets the opcode of Number.

  Overrides:
    `opcode` in class `Blank`

### output

    public int output(util.RandomAccessStream stream)
               throws java.io.IOException

  Outputs the class Number.

  Overrides:
    `output` in class `Blank`
  Throws:
    `java.io.IOException`

### input

    public void input(util.RandomAccessStream stream)
               throws java.io.IOException

  Inputs the class Number from input stream.

  Overrides:
    `input` in class `Blank`
  Throws:
    `java.io.IOException`

### getLength

    public int getLength()

### setFormulaStr

    public void setFormulaStr(java.lang.String str)

  Sets formula string.

### getFormulaStr

    public java.lang.String getFormulaStr()

  Gets formula string.

### setAlwaysCalc

    public void setAlwaysCalc(boolean b)

  Sets whether always to calculate the formula string or not.

  Parameters:
    `b` - true specifies to always calculate the formula string

### isAlwaysCalc

    public boolean isAlwaysCalc()

  Gets whether always to calculate the formula string or not.

  Returns:
    true if to always calculate the formula string

### setCalcOnLoad

    public void setCalcOnLoad(boolean b)

  Sets whether or not to calculate the formula string when loading it.

  Parameters:
    `b` - true specifies to calculate the formula string when loading it

### isCalcOnLoad

    public boolean isCalcOnLoad()

  Gets whether or not to calculate the formula string when loading it.

  Returns:
    true if to calculate the formula string when loading it

### setShrFmla

    public void setShrFmla(boolean b)

  Sets whether the formula string is shared formula or not.

  Parameters:
    `b` - true specifies the formula string is a shared formula

### isShrFmla

    public boolean isShrFmla()

  Gets whether the formula string is a shared formula or not.

  Returns:
    true if the formula string is a shared formula

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD