[bug-64508] add guard for invalid v value

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879905 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2020-07-15 20:56:59 +00:00
parent 20540f3c69
commit 26c2049147
2 changed files with 14 additions and 0 deletions

View File

@ -105,6 +105,7 @@ import org.apache.poi.xssf.model.CalculationChain;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.apache.poi.xssf.usermodel.extensions.XSSFCellFill;
import org.apache.xmlbeans.XmlException;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCalcCell;
@ -3546,4 +3547,17 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues {
}
}
}
@Test
public void testBug64508() throws IOException {
try (Workbook wb = XSSFTestDataSamples.openSampleWorkbook("64508.xlsx")) {
int activeSheet = wb.getActiveSheetIndex();
Sheet sheet1 = wb.getSheetAt(activeSheet);
Row row = sheet1.getRow(1);
CellReference aCellReference = new CellReference("E2");
Cell aCell = row.getCell(aCellReference.getCol());
Assert.assertEquals(CellType.STRING, aCell.getCellType());
Assert.assertEquals("", aCell.getStringCellValue());
}
}
}

Binary file not shown.