jet.report.xls
Class Formula

java.lang.Object
  extended by jet.report.xls.Biff
      extended by jet.report.xls.Blank
          extended by jet.report.xls.Formula
All Implemented Interfaces:
jet.report.xls.DataConstants

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.
 
Fields inherited from class jet.report.xls.Biff
AI, AREA, AREAFORMAT, ATTACHEDLABEL, AXCEXT, AXESUSED, AXIS, AXISLINEFORMAT, AXISPARENT, BACKUP, BAR, BEGIN, BFONT, BLANK, BOF, BOOKBOOL, BOOLERR, BOPPOP, BOTTOMMARGIN, BOUNDSHEET, CALCCOUNT, CALCMODE, CATERRANGE, CHART, CHART3D, CHARTDATALABELEXT, CHARTFORMAT, CHARTLINE, CODEPAGE, COLINFO, CONTINUE, COUNTRY, DATAFORMAT, DATE1904, DBCELL, DCON, DCONNAME, DCONREF, DEFCOLWIDTH, DEFROWHEIGHT, DEFTEXT, DELTA, DIMENSIONS, DROPBAR, DSF, END, EOF, EXTERNCOUNT, EXTERNSHEET, EXTSST, FBI, FILEPASS, FNGROUPCOUNT, FONTX, FOOTER, FORMAT, FORMULA, FRAME, FTCF, FTCMO, FTEND, FTPIOGRBIT, GELFRAME, GRIDSET, GUTS, HCENTER, HEADER, HIDEOBJ, HLINK, HORIZONTALPAGEBREAKS, IFMT, INDEX, INTEGER, INTERFACEEND, INTERFACEHDR, ITERATION, LABEL, LABELSST, LEFTMARGIN, LEGEND, LEGENDDXN, LINE, LINEFORMAT, MARKERFORMAT, MERGECELLS, MMS, MSODRAWING, MSODRAWINGGROUP, MSODRAWINGSELECTION, MSODRAWINGUNKNOWN, NAME, NOTE, NUMBER, OBJ, OBJECTLINK, PALETTE, PANE, PASSWORD, PIE, PIEFORMAT, PLOTAREA, PLOTGROWTH, PLS, POS, PRECISION, PRINTGRIDLINES, PRINTHEADERS, PROT4REV, PROT4REVPASS, PROTECT, RADAR, RADARAREA, REFMODE, REFRESHALL, RIGHTMARGIN, RK, ROW, SAVERECALC, SCATTER, SCL, SELECTION, SERFORMAT, SERIES, SERIESTEXT, SERTOCRT, SETUP, SHTPROPS, SIINDEX, SST, STRING, STYLE, SUPBOOK, SURFACE, TABID, TABLE, TEXT, TICK, TIP, TOPMARGIN, UNITS, UNKNOWN, UNKNOWN1, UNKNOWN10, UNKNOWN2, UNKNOWN3, UNKNOWN4, UNKNOWN5, UNKNOWN6, UNKNOWN7, UNKNOWN8, UNKNOWN9, USESELFS, VALUERANGE, VCENTER, VERTICALPAGEBREAKS, WINDOW1, WINDOW2, WINDOWPROTECT, WRITEACCESS, WSBOOL, XF
 
Fields inherited from interface jet.report.xls.DataConstants
BIG_BLOCK_SIZE, BYTE, DIRECTORY_TYPE, DOCUMENT_TYPE, DOUBLE, FLOAT, INT, LONG, MAX_LENGTH, MAX_RECORD_SIZE, MIN_DOC_SIZE, PROPERTY_SIZE, PROPERTY_TYPE_OFFSET, ROOT_TYPE, SHORT, SMALL_BLOCK_SIZE, UNUSED_BLOCK
 
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()
Overrides:
getLength in class jet.report.xls.Biff

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