diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java index 04ecbbfb6e..d0c2678ad3 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java @@ -1173,7 +1173,7 @@ public final class TestXSSFWorkbook extends BaseTestXWorkbook { @Test void testRightToLeft() throws IOException { - try(XSSFWorkbook workbook = openSampleWorkbook("right-to-left.xlsx")){ + try(XSSFWorkbook workbook = openSampleWorkbook("right-to-left.xlsx")) { Sheet sheet = workbook.getSheet("عربى"); Cell A1 = sheet.getRow(0).getCell(0); @@ -1191,6 +1191,21 @@ public final class TestXSSFWorkbook extends BaseTestXWorkbook { } } + @Test + void test501RC1Failure() throws Exception { + String filename = "0-www-crossref-org.lib.rivier.edu_education-files_suffix-generator.xlsm"; + try(XSSFWorkbook workbook = openSampleWorkbook(filename)) { + for (int i = 0; i < workbook.getNumberOfSheets(); i++) { + XSSFSheet sheet = workbook.getSheetAt(i); + for (Row row : sheet) { + for (Cell cell : row) { + assertNotNull(cell); + } + } + } + } + } + private static void expectFormattedContent(Cell cell, String value) { assertEquals(value, new DataFormatter().formatCellValue(cell), "Cell " + ref(cell) + " has wrong formatted content."); diff --git a/test-data/spreadsheet/0-www-crossref-org.lib.rivier.edu_education-files_suffix-generator.xlsm b/test-data/spreadsheet/0-www-crossref-org.lib.rivier.edu_education-files_suffix-generator.xlsm new file mode 100644 index 0000000000..bc3154be50 Binary files /dev/null and b/test-data/spreadsheet/0-www-crossref-org.lib.rivier.edu_education-files_suffix-generator.xlsm differ