org.apache.poi.hssf.record
Class DConRefRecord

java.lang.Object
  extended by org.apache.poi.hssf.record.RecordBase
      extended by org.apache.poi.hssf.record.Record
          extended by org.apache.poi.hssf.record.StandardRecord
              extended by org.apache.poi.hssf.record.DConRefRecord

public class DConRefRecord
extends StandardRecord

DConRef records specify a range in a workbook (internal or external) that serves as a data source for pivot tables or data consolidation. Represents a DConRef Structure [MS-XLS s. 2.4.86], and the contained DConFile structure [MS-XLS s. 2.5.69]. This in turn contains a XLUnicodeStringNoCch [MS-XLS s. 2.5.296].

         _______________________________
        |          DConRef              |
(bytes) +-+-+-+-+-+-+-+-+-+-+...+-+-+-+-+
        |    ref    |cch|  stFile   | un|
        +-+-+-+-+-+-+-+-+-+-+...+-+-+-+-+
                              |
                     _________|_____________________
                    |DConFile / XLUnicodeStringNoCch|
                    +-+-+-+-+-+-+-+-+-+-+-+...+-+-+-+
             (bits) |h|   reserved  |      rgb      |
                    +-+-+-+-+-+-+-+-+-+-+-+...+-+-+-+
 
Where At the moment this class is read-only.

Author:
Niklas Rehfeld

Field Summary
static short sid
          The id of the record type, sid = 81
 
Constructor Summary
DConRefRecord(byte[] data)
          Read constructor.
DConRefRecord(RecordInputStream inStream)
          Read Constructor.
 
Method Summary
protected  int getDataSize()
           
 int getFirstColumn()
           
 int getFirstRow()
           
 int getLastColumn()
           
 int getLastRow()
           
 byte[] getPath()
           
 java.lang.String getReadablePath()
           
 short getSid()
          return the non static version of the id for this record.
 boolean isExternalRef()
          Checks if the data source in this reference record is external to this sheet or internal.
protected  void serialize(LittleEndianOutput out)
          Write the data content of this BIFF record.
 java.lang.String toString()
          get a string representation of the record (for biffview/debugging)
 
Methods inherited from class org.apache.poi.hssf.record.StandardRecord
getRecordSize, serialize
 
Methods inherited from class org.apache.poi.hssf.record.Record
clone, cloneViaReserialise, serialize
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sid

public static final short sid
The id of the record type, sid = 81

See Also:
Constant Field Values
Constructor Detail

DConRefRecord

public DConRefRecord(byte[] data)
Read constructor.

Parameters:
data - byte array containing a DConRef Record, including the header.

DConRefRecord

public DConRefRecord(RecordInputStream inStream)
Read Constructor.

Parameters:
inStream - RecordInputStream containing a DConRefRecord structure.
Method Detail

getDataSize

protected int getDataSize()
Specified by:
getDataSize in class StandardRecord

serialize

protected void serialize(LittleEndianOutput out)
Description copied from class: StandardRecord
Write the data content of this BIFF record. The 'ushort sid' and 'ushort size' header fields have already been written by the superclass.
The number of bytes written must equal the record size reported by RecordBase.getRecordSize()} minus four ( record header consiting of a 'ushort sid' and 'ushort reclength' has already been written by thye superclass).

Specified by:
serialize in class StandardRecord

getSid

public short getSid()
Description copied from class: Record
return the non static version of the id for this record.

Specified by:
getSid in class Record

getFirstColumn

public int getFirstColumn()
Returns:
The first column of the range.

getFirstRow

public int getFirstRow()
Returns:
The first row of the range.

getLastColumn

public int getLastColumn()
Returns:
The last column of the range.

getLastRow

public int getLastRow()
Returns:
The last row of the range.

toString

public java.lang.String toString()
Description copied from class: Record
get a string representation of the record (for biffview/debugging)

Overrides:
toString in class Record

getPath

public byte[] getPath()
Returns:
raw path byte array.

getReadablePath

public java.lang.String getReadablePath()
Returns:
the link's path, with the special characters stripped/replaced. May be null.
See Also:
2.5.277 (VirtualPath)

isExternalRef

public boolean isExternalRef()
Checks if the data source in this reference record is external to this sheet or internal.

Returns:
true iff this is an external reference.


Copyright 2012 The Apache Software Foundation or its licensors, as applicable.