/// <summary> /// 下方 下一个单元格 /// 遇到空单元格结束 /// </summary> /// <param name="range"></param> /// <param name="skip">起始相对位置,如果为0 则从当前单元格开始</param> /// <returns></returns> public static IEnumerable <ExcelReference> NextRows(this ExcelReference range, int skip) { int i = skip; while (true) { var nextCell = new ExcelReference(range.RowLast + i, range.RowLast + i, range.ColumnLast, range.ColumnLast, range.SheetId); if (nextCell.IsEmpty()) { break; } yield return(nextCell); i++; } }