public static class XSSFReader.SheetIterator
extends java.lang.Object
implements java.util.Iterator<java.io.InputStream>
Modifier and Type | Field and Description |
---|---|
protected java.util.Iterator<XSSFReader.XSSFSheetRef> |
sheetIterator
Iterator over CTSheet objects, returns sheets in
logical order. |
protected java.util.Map<java.lang.String,PackagePart> |
sheetMap
Maps relId and the corresponding PackagePart
|
protected XSSFReader.XSSFSheetRef |
xssfSheetRef
Current sheet reference
|
Modifier | Constructor and Description |
---|---|
protected |
SheetIterator(PackagePart wb)
Construct a new SheetIterator
|
Modifier and Type | Method and Description |
---|---|
protected java.util.Iterator<XSSFReader.XSSFSheetRef> |
createSheetIteratorFromWB(PackagePart wb) |
java.util.List<XSSFShape> |
getShapes()
Returns the shapes associated with this sheet,
an empty list or null if there is an exception
|
Comments |
getSheetComments()
Returns the comments associated with this sheet,
or null if there aren't any
|
java.lang.String |
getSheetName()
Returns name of the current sheet
|
PackagePart |
getSheetPart() |
protected java.util.Set<java.lang.String> |
getSheetRelationships()
Gets string representations of relationships
that are sheet-like.
|
boolean |
hasNext()
Returns
true if the iteration has more elements. |
java.io.InputStream |
next()
Returns input stream of the next sheet in the iteration
|
protected Comments |
parseComments(PackagePart commentsPart) |
void |
remove()
We're read only, so remove isn't supported
|
protected final java.util.Map<java.lang.String,PackagePart> sheetMap
protected XSSFReader.XSSFSheetRef xssfSheetRef
protected final java.util.Iterator<XSSFReader.XSSFSheetRef> sheetIterator
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 packageprotected SheetIterator(PackagePart wb) throws java.io.IOException
wb
- package part holding workbook.xmljava.io.IOException
protected java.util.Iterator<XSSFReader.XSSFSheetRef> createSheetIteratorFromWB(PackagePart wb) throws java.io.IOException
java.io.IOException
protected java.util.Set<java.lang.String> getSheetRelationships()
public boolean hasNext()
true
if the iteration has more elements.hasNext
in interface java.util.Iterator<java.io.InputStream>
true
if the iterator has more elements.public java.io.InputStream next()
next
in interface java.util.Iterator<java.io.InputStream>
public java.lang.String getSheetName()
public Comments getSheetComments()
protected Comments parseComments(PackagePart commentsPart) throws java.io.IOException
java.io.IOException
public java.util.List<XSSFShape> getShapes()
public PackagePart getSheetPart()
public void remove()
remove
in interface java.util.Iterator<java.io.InputStream>
Copyright 2022 The Apache Software Foundation or its licensors, as applicable.