Save This Page
Home » poi-src-3.2-FINAL-20081019 » org.apache » poi » hssf » record » formula » [javadoc | source]
org.apache.poi.hssf.record.formula
public final class: ArrayPtg [javadoc | source]
java.lang.Object
   org.apache.poi.hssf.record.formula.Ptg
      org.apache.poi.hssf.record.formula.ArrayPtg

All Implemented Interfaces:
    Cloneable

ArrayPtg - handles arrays The ArrayPtg is a little weird, the size of the Ptg when parsing initially only includes the Ptg sid and the reserved bytes. The next Ptg in the expression then follows. It is only after the "size" of all the Ptgs is met, that the ArrayPtg data is actually held after this. So Ptg.createParsedExpression keeps track of the number of ArrayPtg elements and need to parse the data upto the FORMULA record size.
Field Summary
public static final  byte sid     
Fields inherited from org.apache.poi.hssf.record.formula.Ptg:
CLASS_REF,  CLASS_VALUE,  CLASS_ARRAY
Constructor:
 public ArrayPtg(RecordInputStream in) 
Method from org.apache.poi.hssf.record.formula.ArrayPtg Summary:
clone,   getColumnCount,   getDefaultOperandClass,   getRowCount,   getSize,   getTokenArrayValues,   getValueIndex,   isBaseToken,   readTokenValues,   toFormulaString,   toString,   writeBytes,   writeTokenValueBytes
Methods from org.apache.poi.hssf.record.formula.Ptg:
clone,   copy,   createParsedExpressionTokens,   createPtg,   getBytes,   getDefaultOperandClass,   getEncodedSize,   getEncodedSize,   getPtgClass,   getSize,   isBaseToken,   readTokens,   serializePtgStack,   serializePtgs,   setClass,   toDebugString,   toFormulaString,   toString,   writeBytes
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.poi.hssf.record.formula.ArrayPtg Detail:
 public Object clone() 
 public short getColumnCount() 
 public byte getDefaultOperandClass() 
 public short getRowCount() 
 public int getSize() 
    This size includes the size of the array Ptg plus the Array Ptg Token value size
 public Object[] getTokenArrayValues() 
 int getValueIndex(int colIx,
    int rowIx) 
    Note - (2D) array elements are stored column by column
 public boolean isBaseToken() 
 public  void readTokenValues(RecordInputStream in) 
    Read in the actual token (array) values. This occurs AFTER the last Ptg in the expression. See page 304-305 of Excel97-2007BinaryFileFormat(xls)Specification.pdf
 public String toFormulaString(HSSFWorkbook book) 
 public String toString() 
 public  void writeBytes(byte[] data,
    int offset) 
 public int writeTokenValueBytes(byte[] data,
    int offset)