public class StreamingWorkbookReader extends Object implements Iterable<Sheet>, Date1904Support, AutoCloseable
| Constructor and Description |
|---|
StreamingWorkbookReader(StreamingReader.Builder builder) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
StreamingSheet |
getSheet(String name)
Returns the sheet with the given name.
|
StreamingSheet |
getSheetAt(int idx)
Returns the sheet at the given index (0 based).
|
List<Map<String,String>> |
getSheetProperties() |
void |
init(File f)
Initializes the reader with the given input stream.
|
void |
init(InputStream is)
Initializes the reader with the given input stream.
|
boolean |
isDate1904() |
Iterator<Sheet> |
iterator() |
Spliterator<Sheet> |
spliterator() |
public StreamingWorkbookReader(StreamingReader.Builder builder)
public void init(InputStream is) throws OpenException, ReadException, ParseException
is - the input stream to read fromOpenException - if an error occurs while opening the fileReadException - if an error occurs while reading the fileParseException - if an error occurs while parsing the filepublic void init(File f) throws OpenException, ReadException, ParseException
f - the file to read fromOpenException - if an error occurs while opening the fileReadException - if an error occurs while reading the fileParseException - if an error occurs while parsing the filepublic StreamingSheet getSheetAt(int idx) throws MissingSheetException, IOException, XMLStreamException
idx - index (0 based)MissingSheetException - if a sheet at the given index does not existIOException - should never be thrownXMLStreamException - should never be thrownpublic StreamingSheet getSheet(String name) throws MissingSheetException, IOException, XMLStreamException
name - the name of the sheet to returnMissingSheetException - if a sheet with the given name does not existIOException - should never be thrownXMLStreamException - should never be thrownpublic Iterator<Sheet> iterator() throws ReadException
iterator in interface Iterable<Sheet>ReadExceptionpublic Spliterator<Sheet> spliterator() throws ReadException
spliterator in interface Iterable<Sheet>ReadExceptionpublic boolean isDate1904()
isDate1904 in interface Date1904Supportpublic void close()
throws IOException
close in interface AutoCloseableIOException