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