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

后端 未结 9 624
执念已碎
执念已碎 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:36

    I have looked up a few websites using ExcelPackage library.
    Also, the page on codeplex has a question on - how to get the number of rows/columns?

    It seems there isn't a support of it. Sorry, the documentation is not available as well.
    You will have to iterate on rows/columns (keeping in mind the max rows/columns the spreadsheet can hold) and check whether the cell contains any value.

    See this link - http://web.archive.org/web/20110123164144/http://nayyeri.net/use-excelpackage-to-manipulate-open-xml-excel-files (original link dead)

提交回复
热议问题