Interface XSSFSheetXMLHandler.SheetContentsHandler
- All Known Subinterfaces:
XSSFBSheetHandler.SheetContentsHandler
- All Known Implementing Classes:
XSSFEventBasedExcelExtractor.SheetTextExtractor
- Enclosing class:
- XSSFSheetXMLHandler
public static interface XSSFSheetXMLHandler.SheetContentsHandler
This interface allows to provide callbacks when reading
a sheet in streaming mode.
The XSLX file is usually read via XSSFReader.
By implementing the methods, you can process arbitrarily large files without exhausting main memory.
-
Method Summary
Modifier and TypeMethodDescriptionvoidA cell, with the given formatted value (may be null), and possibly a comment (may be null), was encountered.default voidcell(String cellReference, String formattedValue, XSSFComment comment) Deprecated.voidendRow(int rowNum) A row with the (zero based) row number has endeddefault voidendSheet()Signal that the end of a sheet was been reacheddefault voidheaderFooter(String text, boolean isHeader, String tagName) A header or footer has been encounteredvoidstartRow(int rowNum) A row with the (zero based) row number has started
-
Method Details
-
startRow
void startRow(int rowNum) A row with the (zero based) row number has started -
endRow
void endRow(int rowNum) A row with the (zero based) row number has ended -
cell
@Deprecated @Removal(version="7.0.0") default void cell(String cellReference, String formattedValue, XSSFComment comment) Deprecated.A cell, with the given formatted value (may be null), and possibly a comment (may be null), was encountered.Sheets that have missing or empty cells may result in sparse calls to
cell. See the code inpoi-examples/src/main/java/org/apache/poi/xssf/eventusermodel/XLSX2CSV.javafor an example of how to handle this scenario. -
cell
A cell, with the given formatted value (may be null), and possibly a comment (may be null), was encountered.Sheets that have missing or empty cells may result in sparse calls to
cell. See the code inpoi-examples/src/main/java/org/apache/poi/xssf/eventusermodel/XLSX2CSV.javafor an example of how to handle this scenario.- Since:
- 6.0.0
-
endSheet
default void endSheet()Signal that the end of a sheet was been reached
-
cell(String, String, Comment)