Skip to content

Commit a48b878

Browse files
committed
add test
1 parent 2ab8ebc commit a48b878

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/test/java/com/github/pjfanning/xlsx/StreamingWorkbookTest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,21 @@ public void testJapaneseTextIncludesPhoneticRuns() throws Exception {
923923
}
924924
}
925925

926+
@Test
927+
public void testStrayWhitespaceInSstRefs() throws Exception {
928+
try (
929+
InputStream stream = getInputStream("bug69769.xlsx");
930+
Workbook workbook = StreamingReader.builder().open(stream)
931+
) {
932+
Sheet sheet0 = workbook.getSheetAt(0);
933+
Iterator<Row> rowIterator = sheet0.rowIterator();
934+
Row row0 = rowIterator.next();
935+
Row row1 = rowIterator.next();
936+
Cell cellB2 = row1.getCell(1);
937+
assertEquals("Mustermann", cellB2.getStringCellValue());
938+
}
939+
}
940+
926941
private void validateFormatsSheet(Sheet sheet) throws IOException {
927942
Iterator<Row> rowIterator = sheet.rowIterator();
928943

src/test/resources/bug69769.xlsx

13.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)