} else {
//The logic to decide the actual affected range to implement autofilter:
//If it's a multi cell range, it's the range intersect with largest range of the sheet.
//If it's a single cell range, it has to be extend to a continuous range by looking up the near 8 cells of the single cell.
affectedArea = new CellRangeAddress(getRow(), getLastRow(), getColumn(), getLastColumn());
final Ref ref = getRefs().iterator().next();
//ZSS-199
if (ref.isWholeRow()) {
//extend to a continuous range from the top row
CellRangeAddress maxRange = getRowCurrentRegion(_sheet, ref.getTopRow(), ref.getBottomRow());
if (maxRange == null) {
throw new RuntimeException(ALL_BLANK_MSG);
}
affectedArea = maxRange;
} else if (BookHelper.isOneCell(_sheet, affectedArea)) { //only one cell selected(include merged one), try to look the max range surround by blank cells