public class XLSRecord extends Object implements BiffRec, BlockByteConsumer, Serializable, XLSConstants
The XLS byte stream is composed of records delimited by a header with type
and data length information, followed by a record Body which contains
the byte[] data for the record.
XLSRecord subclasses provide specific functionality.
WorkBook,
Boundsheet,
Index,
Dbcell,
Row,
Cell,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected short |
col |
protected AbstractList |
continues |
protected int |
DEBUGLEVEL |
Hlink |
hyperlink |
protected Index |
idx |
boolean |
isBlank |
boolean |
isBoolean |
protected boolean |
isContinueMerged |
boolean |
isString |
int |
lastidx |
Xf |
myxf |
int |
offset |
protected int |
rw |
protected ByteStreamer |
streamer |
protected WorkBook |
wkbook |
protected Sheet |
worksheet |
AI, ALLOWDUPES, ALRUNS, AREA, AREAFORMAT, ARRAY, ATTACHEDLABEL, AUTOFILTER, AXCENT, AXESUSED, AXIS, AXISLINEFORMAT, AXISPARENT, BACKUP, BAR, BEGIN, BLANK, BOF, BOOKBOOL, BOOLERR, BOPPOP, BOPPOPCUSTOM, BOTTOM_MARGIN, BOTTOMMARGIN, BOUNDSHEET, CALC_MODE_PROP, CALCCOUNT, CALCMODE, CALCULATE_ALWAYS, CALCULATE_AUTO, CALCULATE_EXPLICIT, CATLAB, CATSERRANGE, CF, CF12, CHART, CHART3DBARSHAPE, CHARTFORMAT, CHARTFORMATLINK, CHARTFRTINFO, CHARTLINE, CODENAME, COLINFO, CONDFMT, CONDFMT12, CONTINUE, COUNTRY, CRN, CRTLAYOUT12, CRTLAYOUT12A, DAT, DATAFORMAT, DATALABEXT, DATALABEXTCONTENTS, DATE1904, DBCELL, DCON, DCONBIN, DCONNAME, DCONREF, DEBUG_HIGH, DEBUG_LOW, DEBUG_MEDIUM, DEFAULTENCODING, DEFAULTROWHEIGHT, DEFAULTTEXT, DEFCOLWIDTH, DELTA, DIMENSIONS, DROPBAR, DSF, DV, DVAL, END, ENDBLOCK, ENDEXTSST, ENDOBJECT, EOF, EXCEL2K, EXTERNCOUNT, EXTERNNAME, EXTERNSHEET, EXTSST, FBI, FEATHEADR, FILE_LOCK, FILEPASS, FONT, FONTBASIS, FONTX, FOOTERREC, FORMAT, FORMULA, FRAME, FRTFONTLIST, FRTWRAPPER, GARBAGE, GELFRAME, GUTS, HCENTER, HEADERREC, HLINK, HORIZONTAL_PAGE_BREAKS, IFMT, INDEX, INTERFACE_HDR, ITERATION, LABEL, LABELSST, LEFT_MARGIN, LEFTMARGIN, LEGEND, LEGENDXN, LINE, LINEFORMAT, MARKERFORMAT, MAXCOLS, MAXCOLS_BIFF8, MAXRECLEN, MAXROWS, MAXROWS_BIFF8, MERGEDCELLS, MSODRAWING, MSODRAWINGGROUP, MSODRAWINGSELECTION, MULBLANK, MULRK, NAME, NOTE, NUMBER, OBJ, OBJECTLINK, OBJPROTECT, OBPROJ, PALETTE, PANE, PASSWORD, PHONETIC, PICF, PIE, PIEFORMAT, PIVOTCHARTBITS, PIVOTCHARTLINK, PLOTAREA, PLOTGROWTH, PLS, PLV, POS, PRECISION, PRINT_GRIDLINES, PRINT_ROW_HEADERS, PRINTGRID, PRINTROWCOL, PROT4REV, PROTECT, QSISXTAG, RADAR, RADARAREA, RANGEPROTECTION, REFMODE, REFTRACK_PROP, RIGHT_MARGIN, RIGHTMARGIN, RK, ROW, RRD_HEAD, RRD_INFO, RSTRING, RTENTEXU, RTMERGECELLS, SBASEREF, SCATTER, SCENPROTECT, SCL, SELECTION, SERAUXERRBAR, SERAUXTREND, SERFMT, SERIES, SERIESLIST, SERIESTEXT, SERPARENT, SERTOCRT, SETUP, SHAREDUPES, SHEETLAYOUT, SHEETPROTECTION, SHRFMLA, SHTPROPS, SIIINDEX, SST, STARTBLOCK, STARTOBJECT, STRING_ENCODING_AUTO, STRING_ENCODING_COMPRESSED, STRING_ENCODING_UNICODE, STRINGREC, STYLE, SUPBOOK, SURFACE, SXADDL, SXBOOL, SXDB, SXDBB, SXDBEX, SXDI, SXEX, SXFDB, SXFDBTYPE, SXFORMAT, SXIVD, SXLI, SXNUM, SXPI, SXSTREAMID, SXSTRING, SXVD, SXVDEX, SXVI, SXVIEW, SXVIEWEX9, SXVIEWLINK, SXVS, TABID, TABLE, TABLESTYLES, TEXTDISP, THREED, TICK, TOP_MARGIN, TOPMARGIN, TXO, TYPE_BLANK, TYPE_BOOLEAN, TYPE_DOUBLE, TYPE_FORMULA, TYPE_FP, TYPE_INT, TYPE_STRING, UNICODEENCODING, UNITS, USERBVIEW, USERSVIEWBEGIN, USERSVIEWEND, USETEMPFILE_PROP, USR_EXCL, VALIDATEWORKBOOK, VALUERANGE, VB_MODULE, VCENTER, VERTICAL_PAGE_BREAKS, WINDOW_PROTECT, WINDOW1, WINDOW2, WK_CHART, WK_FILE, WK_GLOBALS, WK_MACROSHEET, WK_WORKSHEET, WSBOOL, XCT, XF, XLS_MAX_COLS, YMULT| Constructor and Description |
|---|
XLSRecord() |
| Modifier and Type | Method and Description |
|---|---|
void |
addContinue(Continue c)
adds a CONTINUE record to the array of CONTINUE records
for this record, containing all data
beyond the 8224 byte record size limit.
|
Object |
clone()
clone a record
|
void |
close()
clear out object references in prep for closing workbook
|
void |
copyFormat(BiffRec source)
Copy all formatting info from source biffrec
|
boolean |
getBooleanVal()
Get the value of the record as a Boolean.
|
byte |
getByteAt(int off)
Gets the byte from the specified position in the
record byte array.
|
BlockByteReader |
getByteReader()
Get the BlockByteReader for this Consumer
|
byte[] |
getBytes()
Gets the byte from the specified position in the
record byte array.
|
byte[] |
getBytesAt(int off,
int len)
Gets the byte from the specified position in the
record byte array.
|
String |
getCellAddress()
get a string address for the
cell based on row and col ie: "H22"
|
String |
getCellAddressWithSheet()
return the cell address with sheet reference
eg Sheet!A12
|
int |
getCellType()
get the int val of the type for the valrec
|
short |
getColNumber() |
Color[] |
getColorTable()
Get the color table for the associated workbook.
|
List |
getContinueVect()
returns the array of CONTINUE records for this record, containing all
data beyond the 8224 byte record size limit.
|
byte[] |
getData()
gets the record data merging any Continue record
data.
|
String |
getDataType()
get the data type name for this record
|
double |
getDblVal()
Get the value of the record as a Double.
|
Object |
getDefaultVal()
get a default "empty" data value for this record
|
BlockByteReader |
getEncryptedByteReader() |
int |
getFirstBlock()
Returns the index of the first block
|
float |
getFloatVal()
Get the value of the record as a Float.
|
Font |
getFont()
returns the existing font record
for this Cell
|
String |
getFormatPattern()
set the Formatting for this BiffRec from the pattern
match.
|
Formula |
getFormulaRec() |
Hlink |
getHyperlink() |
Object |
getInternalVal()
get the int val of the type for the valrec
|
int[] |
getIntLocation()
returns the cell address in int[] {row, col} format
|
int |
getIntVal()
Get the value of the record as an Integer.
|
int |
getIxfe()
get the ixfe
|
int |
getLastBlock()
Returns the index of the last block
|
int |
getLength()
Returns the length of this
record, including the 4 header bytes
|
CellRange |
getMergeRange() |
int |
getOffset()
Get the relative position within the data
underlying the block vector represented by
the BlockByteReader.
|
short |
getOpcode() |
protected static XLSRecord |
getPrototype()
get a new, generic instance of a Record.
|
int |
getRealRecordIndex()
return the real (not just boundsheet) record index of this object
|
String |
getRecDesc() |
int |
getRecordIndex()
return the record index of this object
|
Row |
getRow()
get the row of this cell
|
int |
getRowNumber() |
Boundsheet |
getSheet()
get the WorkSheet for this record.
|
ByteStreamer |
getStreamer() |
String |
getStringVal()
Get the value of the record as a String.
|
String |
getStringVal(String encoding)
Get the value of the record as a String.
|
WorkBook |
getWorkBook() |
Xf |
getXfRec() |
boolean |
hasContinues()
returns whether this record has a CONTINUE
record containing data beyond the 8228 byte
record size limit.
|
void |
init()
perform record initialization
|
protected void |
initRowCol() |
boolean |
isFormula()
return whether this is a formula record
|
boolean |
isNumber()
return whether this is a numeric type
|
boolean |
isReadOnly() |
boolean |
isValueForCell() |
protected void |
mergeContinues()
Merge continue data in to the record data array
|
void |
postStream()
do any post-streaming cleanup such as expensive index updates or other
deferrable processing.
|
void |
preStream()
do any pre-streaming processing such as expensive
index updates or other deferrable processing.
|
boolean |
remove(boolean nullme)
Removes this BiffRec from the WorkSheet
|
void |
removeContinues()
remove all Continue records
|
void |
resetCacheBytes()
resets the cache bytes so they do not take up space
|
void |
setBooleanVal(boolean b) |
void |
setByteReader(BlockByteReader db)
Set the BlockByteReader for this Consumer
|
void |
setCol(short i)
set the column
|
void |
setData(byte[] b) |
void |
setDebugLevel(int b)
set the DEBUG level
|
void |
setDoubleVal(double v) |
void |
setEncryptedByteReader(BlockByteReader db)
Hold onto the original encrypted bytes so we can do a look ahead on records
|
void |
setFirstBlock(int i)
Sets the index of the first block
|
void |
setFloatVal(float v) |
void |
setHyperlink(Hlink hl) |
void |
setIndex(Index id)
associate this record with its Index record
|
void |
setIntVal(int v) |
void |
setIsValueForCell(boolean b)
set whether this record contains the value
of the Cell.
|
void |
setIxfe(int i)
set the XF (format) record for this rec
|
void |
setLastBlock(int i)
Sets the index of the last block
|
void |
setLength(int len) |
void |
setMergeRange(CellRange range) |
void |
setOffset(int pos)
Set the relative position within the data
underlying the block vector represented by
the BlockByteReader.
|
void |
setOpcode(short op) |
void |
setRow(Row r) |
void |
setRowCol(int[] x) |
void |
setRowNumber(int i)
set the row
|
void |
setSheet(Sheet b)
Associate this record with a worksheet.
|
void |
setStreamer(ByteStreamer str) |
void |
setStringVal(String v) |
void |
setValueForCell(boolean isVal) |
void |
setWorkBook(WorkBook wk) |
void |
setXFRecord()
set the XF (format) record for this rec
|
void |
setXFRecord(int i)
set the XF (format) record for this rec
|
boolean |
shouldEncrypt() |
String |
toHexDump()
Dumps this record as a human-readable string.
|
String |
toString() |
protected boolean isContinueMerged
protected transient int DEBUGLEVEL
public boolean isString
public boolean isBoolean
public boolean isBlank
protected int rw
protected short col
public int offset
protected transient Index idx
protected Sheet worksheet
public transient Xf myxf
protected transient WorkBook wkbook
protected transient ByteStreamer streamer
protected AbstractList continues
public Hlink hyperlink
public int lastidx
public void setHyperlink(Hlink hl)
setHyperlink in interface BiffRecpublic Formula getFormulaRec()
getFormulaRec in interface BiffRecpublic boolean shouldEncrypt()
public Font getFont()
public CellRange getMergeRange()
getMergeRange in interface BiffRecpublic void setMergeRange(CellRange range)
setMergeRange in interface BiffRecrange - public boolean remove(boolean nullme)
public String getFormatPattern()
getFormatPattern in interface BiffRecpublic int getCellType()
public void setOffset(int pos)
setOffset in interface BlockByteConsumersetOffset in interface BiffRecpos - public int getOffset()
getOffset in interface BlockByteConsumergetOffset in interface BiffRecpublic void setFirstBlock(int i)
setFirstBlock in interface BlockByteConsumerpublic void setLastBlock(int i)
setLastBlock in interface BlockByteConsumerpublic int getFirstBlock()
getFirstBlock in interface BlockByteConsumerpublic int getLastBlock()
getLastBlock in interface BlockByteConsumerprotected void initRowCol()
public String getRecDesc()
public String toHexDump()
public void copyFormat(BiffRec source)
copyFormat in interface BiffRecBiffRec.copyFormat(io.starter.formats.XLS.BiffRec)public boolean isNumber()
public boolean isFormula()
public void setDebugLevel(int b)
setDebugLevel in interface BiffRecpublic int getRealRecordIndex()
public int getRecordIndex()
getRecordIndex in interface BiffRecpublic void addContinue(Continue c)
addContinue in interface BiffRecpublic void removeContinues()
removeContinues in interface BiffRecpublic List getContinueVect()
BiffRecgetContinueVect in interface BiffRecpublic boolean hasContinues()
hasContinues in interface BiffRecpublic void setIsValueForCell(boolean b)
setIsValueForCell in interface BiffRecpublic void setIndex(Index id)
public void setSheet(Sheet b)
public Boundsheet getSheet()
public void setWorkBook(WorkBook wk)
setWorkBook in interface BiffRecpublic WorkBook getWorkBook()
getWorkBook in interface BiffRecpublic void setRowNumber(int i)
setRowNumber in interface BiffRecpublic short getColNumber()
getColNumber in interface BiffRecpublic int getRowNumber()
getRowNumber in interface BiffRecpublic String getCellAddress()
getCellAddress in interface BiffRecpublic int[] getIntLocation()
public String getCellAddressWithSheet()
public Object getDefaultVal()
getDefaultVal in interface BiffRecpublic String getDataType()
getDataType in interface BiffRecpublic Object getInternalVal()
getInternalVal in interface BiffRecpublic boolean getBooleanVal()
getBooleanVal in interface BiffRecpublic int getIntVal()
public double getDblVal()
public float getFloatVal()
getFloatVal in interface BiffRecpublic String getStringVal()
getStringVal in interface BiffRecpublic String getStringVal(String encoding)
getStringVal in interface BiffRecpublic void setStringVal(String v)
setStringVal in interface BiffRecpublic void setBooleanVal(boolean b)
setBooleanVal in interface BiffRecpublic void setFloatVal(float v)
public void setDoubleVal(double v)
setDoubleVal in interface BiffRecpublic void preStream()
public void setXFRecord()
setXFRecord in interface BiffRecpublic void setXFRecord(int i)
setXFRecord in interface BiffRecpublic void setIxfe(int i)
protected static XLSRecord getPrototype()
public void setByteReader(BlockByteReader db)
BlockByteConsumersetByteReader in interface BlockByteConsumersetByteReader in interface BiffRecpublic BlockByteReader getByteReader()
BlockByteConsumergetByteReader in interface BlockByteConsumergetByteReader in interface BiffRecpublic void setEncryptedByteReader(BlockByteReader db)
setEncryptedByteReader in interface BiffRecpublic BlockByteReader getEncryptedByteReader()
getEncryptedByteReader in interface BiffRecpublic byte[] getData()
protected void mergeContinues()
public byte[] getBytes()
public byte[] getBytesAt(int off,
int len)
getBytesAt in interface BiffRecoff - public void resetCacheBytes()
public byte getByteAt(int off)
public int getLength()
getLength in interface BlockByteConsumergetLength in interface BiffRecpublic boolean isValueForCell()
isValueForCell in interface BiffRecpublic void setValueForCell(boolean isVal)
isVal - true if this is a cell-type recordpublic boolean isReadOnly()
isReadOnly in interface BiffRecpublic ByteStreamer getStreamer()
getStreamer in interface BiffRecpublic void setStreamer(ByteStreamer str)
setStreamer in interface BiffRecstreamer - The streamer to set.public Hlink getHyperlink()
getHyperlink in interface BiffRecpublic void postStream()
BiffRecpostStream in interface BiffRecpublic void close()
public Color[] getColorTable()
Copyright © 2002–2019 Starter Inc.. All rights reserved.