mirror of https://github.com/apache/poi.git
[bug-67778] add more null checks to BaseXSSFFormulaEvaluator
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1913258 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8759103c94
commit
176a685e2d
|
@ -143,13 +143,18 @@ public abstract class BaseXSSFFormulaEvaluator extends BaseFormulaEvaluator {
|
|||
int lastRow = area3DPxg.getLastRow();
|
||||
for (int rowIndex = firstRow; rowIndex <= lastRow; rowIndex++) {
|
||||
XSSFRow row = sheet.getRow(rowIndex);
|
||||
int firstColumn = area3DPxg.getFirstColumn();
|
||||
int lastColumn = area3DPxg.getLastColumn();
|
||||
for (int cellIndex = firstColumn; cellIndex <= lastColumn; cellIndex++) {
|
||||
XSSFCell cell = row.getCell(cellIndex);
|
||||
String cellValue = cell.getRawValue();
|
||||
String cellR = new CellReference(cell).formatAsString(false);
|
||||
externalLinksTable.cacheData(sheet.getSheetName(), (long)rowIndex + 1, cellR, cellValue);
|
||||
if (row != null) {
|
||||
int firstColumn = area3DPxg.getFirstColumn();
|
||||
int lastColumn = area3DPxg.getLastColumn();
|
||||
for (int cellIndex = firstColumn; cellIndex <= lastColumn; cellIndex++) {
|
||||
XSSFCell cell = row.getCell(cellIndex);
|
||||
if (cell != null) {
|
||||
String cellValue = cell.getRawValue();
|
||||
String cellR = new CellReference(cell).formatAsString(false);
|
||||
externalLinksTable.cacheData(sheet.getSheetName(),
|
||||
(long)rowIndex + 1, cellR, cellValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue