public XLTableRow LastRowUsed(Boolean includeFormats, Func <IXLTableRow, Boolean> predicate = null) { if (predicate == null) { return(new XLTableRow(this, (_range.LastRowUsed(includeFormats)))); } Int32 rowCount = _range.RowCount(); for (Int32 ro = rowCount; ro >= 1; ro--) { var row = new XLTableRow(this, (_range.Row(ro))); if (!row.IsEmpty(includeFormats) && predicate(row)) { return(row); } } return(null); }
internal XLTableRow LastRowUsed(XLCellsUsedOptions options, Func <IXLTableRow, Boolean> predicate = null) { if (predicate == null) { return(new XLTableRow(this, (_range.LastRowUsed(options)))); } Int32 rowCount = _range.RowCount(); for (Int32 ro = rowCount; ro >= 1; ro--) { var row = new XLTableRow(this, (_range.Row(ro))); if (!row.IsEmpty(options) && predicate(row)) { return(row); } } return(null); }