GetEnumerator

RowCollection.GetEnumerator method

获取遍历此集合的枚举器

public IEnumerator GetEnumerator()

返回值

枚举器

例子

[C#]
Workbook workbook = new Workbook("template.xlsx");
Cells cells = workbook.Worksheets[0].Cells;

IEnumerator en = cells.Rows.GetEnumerator();
while (en.MoveNext())
{
    Row row = (Row)en.Current;
    Console.WriteLine(row.Index + ": " + row.Height);
}

也可以看看