C#: Getting the number of rows/columns with ExcelPackage

后端 未结 9 626
执念已碎
执念已碎 2021-02-03 18:59

I need to read and write data from an Excel spreadsheet. Is there a method to finding out how many rows/columns a certain worksheet has using ExcelPackage? I have the following

9条回答
  •  太阳男子
    2021-02-03 19:42

    int row = _excelSheet.Rows.CurrentRegion.EntireRow.Count;
    int col = _excelSheet.Columns.CurrentRegion.EntireColumn.Count;
    

提交回复
热议问题