diff --git a/src/test/java/com/github/pjfanning/xlsx/StreamingReaderTest.java b/src/test/java/com/github/pjfanning/xlsx/StreamingReaderTest.java index 2a365f2c..d188e458 100644 --- a/src/test/java/com/github/pjfanning/xlsx/StreamingReaderTest.java +++ b/src/test/java/com/github/pjfanning/xlsx/StreamingReaderTest.java @@ -1681,6 +1681,29 @@ public void testMissingSheet() throws Exception { } } + @Test + public void testSXSSF() throws Exception { + // tests a file create using POI SXSSF + // https://bz.apache.org/bugzilla/show_bug.cgi?id=69433 + try ( + InputStream inputStream = new FileInputStream("src/test/resources/poi-69433.xlsx"); + Workbook wb = StreamingReader.builder().open(inputStream) + ) { + Iterator sheetIterator = wb.sheetIterator(); + + final AtomicInteger cellCount = new AtomicInteger(); + sheetIterator.forEachRemaining(sheet -> { + for (Row r : sheet) { + r.cellIterator().forEachRemaining(cell -> { + assertNotNull(cell); + cellCount.incrementAndGet(); + }); + } + }); + assertEquals(12, cellCount.get()); + } + } + private void testReadFile(boolean useReadOnlySst) throws Exception { try ( InputStream inputStream = new FileInputStream("src/test/resources/stream_reader_test.xlsx"); diff --git a/src/test/resources/poi-69433.xlsx b/src/test/resources/poi-69433.xlsx new file mode 100644 index 00000000..edba1807 Binary files /dev/null and b/src/test/resources/poi-69433.xlsx differ