how to get EPPlus OpenXML row count (c#)

前端 未结 5 1684
无人共我
无人共我 2021-01-17 09:49

I searched for it and found the link C# EPPlus OpenXML count rows

int iRowCount = currentWorksheet.Dimension.End.Row - currentWorksheet.Dimension.Start.Row;
         


        
5条回答
  •  清酒与你
    2021-01-17 10:11

    Another way to do it.

    var lastRow = sheet.Cells.Where(cell => !string.IsNullOrEmpty(cell.Value?.ToString() ?? string.Empty)).LastOrDefault().End.Row;

提交回复
热议问题