Class XSSFReader.SheetIterator

    • Field Detail

      • sheetMap

        protected final Map<String,​PackagePart> sheetMap
        Maps relId and the corresponding PackagePart
      • sheetIterator

        protected final Iterator<XSSFReader.XSSFSheetRef> sheetIterator
        Iterator over CTSheet objects, returns sheets in logical order. We can't rely on the Ooxml4J's relationship iterator because it returns objects in physical order, i.e. as they are stored in the underlying package
    • Constructor Detail

      • SheetIterator

        protected SheetIterator​(PackagePart wb)
                         throws IOException
        Construct a new SheetIterator
        Parameters:
        wb - package part holding workbook.xml
        Throws:
        IOException
    • Method Detail

      • getSheetRelationships

        protected Set<String> getSheetRelationships()
        Gets string representations of relationships that are sheet-like. Added to allow subclassing by XSSFBReader. This is used to decide what relationships to load into the sheetRefs
        Returns:
        all relationships that are sheet-like
      • hasNext

        public boolean hasNext()
        Returns true if the iteration has more elements.
        Specified by:
        hasNext in interface Iterator<InputStream>
        Returns:
        true if the iterator has more elements.
      • next

        public InputStream next()
        Returns input stream of the next sheet in the iteration
        Specified by:
        next in interface Iterator<InputStream>
        Returns:
        input stream of the next sheet in the iteration
      • getSheetName

        public String getSheetName()
        Returns name of the current sheet
        Returns:
        name of the current sheet
      • getSheetComments

        public Comments getSheetComments()
        Returns the comments associated with this sheet, or null if there aren't any
      • getShapes

        public List<XSSFShape> getShapes()
        Returns the shapes associated with this sheet, an empty list or null if there is an exception
      • remove

        public void remove()
        We're read only, so remove isn't supported
        Specified by:
        remove in interface Iterator<InputStream>