This is an automated email from the ASF dual-hosted git repository.

pjfanning pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/poi.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 6d3c8d6111 add testInvalidCellRef (#1260)
6d3c8d6111 is described below

commit 6d3c8d6111c11b99ea851dfb9ee5c67b1c7bdd66
Author: PJ Fanning <[email protected]>
AuthorDate: Wed Sep 9 23:11:24 2026 +0100

    add testInvalidCellRef (#1260)
---
 .../org/apache/poi/xssf/usermodel/TestXSSFBugs.java  |  19 +++++++++++++++++++
 test-data/spreadsheet/invalid_cell_reference.xlsx    | Bin 0 -> 3227 bytes
 2 files changed, 19 insertions(+)

diff --git 
a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFBugs.java 
b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
index 2eea923f23..d09ee6c337 100644
--- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
+++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
@@ -3930,6 +3930,25 @@ public final class TestXSSFBugs extends 
BaseTestBugzillaIssues {
         }
     }
 
+    @Test
+    void testInvalidCellRef() throws Exception {
+        // https://github.com/pjfanning/excel-streaming-reader/pull/390
+        try (XSSFWorkbook wb = 
openSampleWorkbook("invalid_cell_reference.xlsx")) {
+            XSSFSheet sheet = wb.getSheetAt(0);
+            String valueB1 = null;
+            for(Row row : sheet) {
+                for(Cell cell : row) {
+                    assertNotNull(cell);
+                    assertNotNull(cell.getAddress());
+                    if (cell.getAddress().formatAsString().equals("B1")) {
+                        valueB1 = cell.getStringCellValue();
+                    }
+                }
+            }
+            assertEquals("Second inline cell", valueB1);
+        }
+    }
+
     private static void readByCommonsCompress(File temp_excel_poi) throws 
IOException {
         /* read by commons-compress*/
         try (ZipFile zipFile = 
ZipFile.builder().setFile(temp_excel_poi).get()) {
diff --git a/test-data/spreadsheet/invalid_cell_reference.xlsx 
b/test-data/spreadsheet/invalid_cell_reference.xlsx
new file mode 100644
index 0000000000..bbc32b23d8
Binary files /dev/null and b/test-data/spreadsheet/invalid_cell_reference.xlsx 
differ


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to