public int getLastRowNum() {
return _xs.getLastRowNum();
}
-
+
/* (non-Javadoc)
* @see org.apache.poi.ss.formula.EvaluationSheet#isRowHidden(int)
* @since POI 4.1.0
SXSSFRow row = _xs.getRow(rowIndex);
if (row == null) {
if (rowIndex <= _xs.getLastFlushedRowNum()) {
- throw new SXSSFFormulaEvaluator.RowFlushedException(rowIndex);
+ throw new SXSSFFormulaEvaluator.RowFlushedException(rowIndex, _xs.getLastFlushedRowNum());
}
return null;
}
}
return new SXSSFEvaluationCell(cell, this);
}
-
+
/* (non-JavaDoc), inherit JavaDoc from EvaluationSheet
* @since POI 3.15 beta 3
*/
// Check if any rows have already been flushed out
int lastFlushedRowNum = ((SXSSFSheet) sheet).getLastFlushedRowNum();
if (lastFlushedRowNum > -1) {
- if (! skipOutOfWindow) throw new RowFlushedException(0);
+ if (!skipOutOfWindow) {
+ throw new RowFlushedException(0, lastFlushedRowNum);
+ }
+
LOG.atInfo().log("Rows up to {} have already been flushed, skipping", box(lastFlushedRowNum));
}
}
}
}
public static class RowFlushedException extends IllegalStateException {
- protected RowFlushedException(int rowNum) {
- super("Row " + rowNum + " has been flushed, cannot evaluate all cells");
+ protected RowFlushedException(int rowNum, int lastFlushedRowNum) {
+ super("Row " + rowNum + " has been flushed (rows up to " + lastFlushedRowNum + " have been flushed), cannot evaluate all cells");
}
}
}