Class BoundSheetRecord

  • All Implemented Interfaces:
    org.apache.poi.common.Duplicatable, GenericRecord

    public final class BoundSheetRecord
    extends StandardRecord
    Defines a sheet within a workbook. Basically stores the sheet name and tells where the Beginning of file record is within the HSSF file.
    • Constructor Detail

      • BoundSheetRecord

        public BoundSheetRecord​(java.lang.String sheetname)
      • BoundSheetRecord

        public 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)
        Parameters:
        in - the record stream to read from
    • Method Detail

      • 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

        public void setSheetname​(java.lang.String sheetName)
        Set the sheetname for this sheet. (this appears in the tabs at the bottom)
        Parameters:
        sheetName - the name of the sheet
        Throws:
        java.lang.IllegalArgumentException - if sheet name will cause excel to crash.
        See Also:
        for a safe way to create valid names
      • 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

        public java.lang.String getSheetname()
        get the sheetname for this sheet. (this appears in the tabs at the bottom)
        Returns:
        sheetname the name of the sheet
      • 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
        Returns:
        he id for this record
      • isHidden

        public boolean isHidden()
        Is the sheet hidden? Different from very hidden
        Returns:
        true if hidden
      • setHidden

        public void setHidden​(boolean hidden)
        Is the sheet hidden? Different from very hidden
        Parameters:
        hidden - true if hidden
      • isVeryHidden

        public boolean isVeryHidden()
        Is the sheet very hidden? Different from (normal) hidden
        Returns:
        true if very hidden
      • setVeryHidden

        public void setVeryHidden​(boolean veryHidden)
        Is the sheet very hidden? Different from (normal) hidden
        Parameters:
        veryHidden - true if very hidden
      • orderByBofPosition

        public static BoundSheetRecord[] orderByBofPosition​(java.util.List<BoundSheetRecord> boundSheetRecords)
        Converts a List of BoundSheetRecords to an array and sorts by the position of their BOFs.
        Parameters:
        boundSheetRecords - the boundSheetRecord list to arrayify
        Returns:
        the sorted boundSheetRecords
      • getGenericProperties

        public java.util.Map<java.lang.String,​java.util.function.Supplier<?>> getGenericProperties()