public final class BoundSheetRecord extends StandardRecord
Description: Defines a sheet within a workbook. Basically stores the sheet name and tells where the Beginning of file record is within the HSSF file.
REFERENCE: PG 291 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
Modifier and Type | Field and Description |
---|---|
static short |
sid |
Constructor and Description |
---|
BoundSheetRecord(RecordInputStream in)
UTF8: sid + len + bof + flags + len(str) + unicode + str 2 + 2 + 4 + 2 +
1 + 1 + len(str)
UNICODE: sid + len + bof + flags + len(str) + unicode + str 2 + 2 + 4 + 2 +
1 + 1 + 2 * len(str)
|
BoundSheetRecord(java.lang.String sheetname) |
Modifier and Type | Method and Description |
---|---|
protected int |
getDataSize() |
int |
getPositionOfBof()
get the offset in bytes of the Beginning of File Marker within the HSSF Stream part of the POIFS file
|
java.lang.String |
getSheetname()
get the sheetname for this sheet.
|
short |
getSid()
return the non static version of the id for this record.
|
boolean |
isHidden()
Is the sheet hidden? Different from very hidden
|
boolean |
isVeryHidden()
Is the sheet very hidden? Different from (normal) hidden
|
static BoundSheetRecord[] |
orderByBofPosition(java.util.List<BoundSheetRecord> boundSheetRecords)
Converts a List of
BoundSheetRecord s to an array and sorts by the position of their
BOFs. |
void |
serialize(LittleEndianOutput out)
Write the data content of this BIFF record.
|
void |
setHidden(boolean hidden)
Is the sheet hidden? Different from very hidden
|
void |
setPositionOfBof(int pos)
set the offset in bytes of the Beginning of File Marker within the HSSF
Stream part of the POIFS file
|
void |
setSheetname(java.lang.String sheetName)
Set the sheetname for this sheet.
|
void |
setVeryHidden(boolean veryHidden)
Is the sheet very hidden? Different from (normal) hidden
|
java.lang.String |
toString()
get a string representation of the record (for biffview/debugging)
|
getRecordSize, serialize
clone, cloneViaReserialise, serialize
public static final short sid
public BoundSheetRecord(java.lang.String sheetname)
public BoundSheetRecord(RecordInputStream in)
in
- the record stream to read frompublic void setPositionOfBof(int pos)
pos
- offset in bytespublic void setSheetname(java.lang.String sheetName)
sheetName
- the name of the sheetjava.lang.IllegalArgumentException
- if sheet name will cause excel to crash.for a safe way to create valid names
public int getPositionOfBof()
public java.lang.String getSheetname()
public java.lang.String toString()
Record
protected int getDataSize()
getDataSize
in class StandardRecord
public void serialize(LittleEndianOutput out)
StandardRecord
The number of bytes written must equal the record size reported by
RecordBase.getRecordSize()
} minus four
( record header consisting of a 'ushort sid' and 'ushort reclength' has already been written
by their superclass).
serialize
in class StandardRecord
out
- the output objectpublic short getSid()
Record
public boolean isHidden()
true
if hiddenpublic void setHidden(boolean hidden)
hidden
- true
if hiddenpublic boolean isVeryHidden()
true
if very hiddenpublic void setVeryHidden(boolean veryHidden)
veryHidden
- true
if very hiddenpublic static BoundSheetRecord[] orderByBofPosition(java.util.List<BoundSheetRecord> boundSheetRecords)
BoundSheetRecord
s to an array and sorts by the position of their
BOFs.boundSheetRecords
- the boundSheetRecord list to arrayifyCopyright 2018 The Apache Software Foundation or its licensors, as applicable.