Package org.apache.poi.hssf.record
Class BoundSheetRecord
java.lang.Object
org.apache.poi.hssf.record.RecordBase
org.apache.poi.hssf.record.Record
org.apache.poi.hssf.record.StandardRecord
org.apache.poi.hssf.record.BoundSheetRecord
- All Implemented Interfaces:
org.apache.poi.common.Duplicatable,GenericRecord
Defines a sheet within a workbook. Basically stores the sheet name and
tells where the Beginning of file record is within the HSSF file.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBoundSheetRecord(String sheetname) BoundSheetRecord(BoundSheetRecord other) 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) -
Method Summary
Modifier and TypeMethodDescriptioncopy()intget the offset in bytes of the Beginning of File Marker within the HSSF Stream part of the POIFS fileget the sheetname for this sheet.shortgetSid()return the non static version of the id for this record.booleanisHidden()Is the sheet hidden? Different from very hiddenbooleanIs the sheet very hidden? Different from (normal) hiddenstatic BoundSheetRecord[]orderByBofPosition(List<BoundSheetRecord> boundSheetRecords) Converts a List ofBoundSheetRecords to an array and sorts by the position of their BOFs.voidvoidsetHidden(boolean hidden) Is the sheet hidden? Different from very hiddenvoidsetPositionOfBof(int pos) set the offset in bytes of the Beginning of File Marker within the HSSF Stream part of the POIFS filevoidsetSheetname(String sheetName) Set the sheetname for this sheet.voidsetVeryHidden(boolean veryHidden) Is the sheet very hidden? Different from (normal) hiddenMethods inherited from class org.apache.poi.hssf.record.StandardRecord
getRecordSize, serializeMethods inherited from class org.apache.poi.hssf.record.Record
cloneViaReserialise, serialize, toStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericChildren
-
Field Details
-
sid
public static final short sid- See Also:
-
-
Constructor Details
-
BoundSheetRecord
-
BoundSheetRecord
-
BoundSheetRecord
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)- Parameters:
in- the record stream to read from
-
-
Method Details
-
setPositionOfBof
public void setPositionOfBof(int pos) set the offset in bytes of the Beginning of File Marker within the HSSF Stream part of the POIFS file- Parameters:
pos- offset in bytes
-
setSheetname
Set the sheetname for this sheet. (this appears in the tabs at the bottom)- Parameters:
sheetName- the name of the sheet- Throws:
IllegalArgumentException- if sheet name will cause excel to crash.- See Also:
-
getPositionOfBof
public int getPositionOfBof()get the offset in bytes of the Beginning of File Marker within the HSSF Stream part of the POIFS file- Returns:
- offset in bytes
-
getSheetname
get the sheetname for this sheet. (this appears in the tabs at the bottom)- Returns:
- sheetname the name of the sheet
-
serialize
-
getSid
public short getSid()Description copied from class:Recordreturn the non static version of the id for this record. -
isHidden
public boolean isHidden()Is the sheet hidden? Different from very hidden- Returns:
trueif hidden
-
setHidden
public void setHidden(boolean hidden) Is the sheet hidden? Different from very hidden- Parameters:
hidden-trueif hidden
-
isVeryHidden
public boolean isVeryHidden()Is the sheet very hidden? Different from (normal) hidden- Returns:
trueif very hidden
-
setVeryHidden
public void setVeryHidden(boolean veryHidden) Is the sheet very hidden? Different from (normal) hidden- Parameters:
veryHidden-trueif very hidden
-
orderByBofPosition
Converts a List ofBoundSheetRecords to an array and sorts by the position of their BOFs.- Parameters:
boundSheetRecords- the boundSheetRecord list to arrayify- Returns:
- the sorted boundSheetRecords
-
copy
- Specified by:
copyin interfaceorg.apache.poi.common.Duplicatable- Specified by:
copyin classStandardRecord
-
getGenericRecordType
- Specified by:
getGenericRecordTypein interfaceGenericRecord- Specified by:
getGenericRecordTypein classRecord
-
getGenericProperties
-