This project has moved. For the latest updates, please go here.

How to find out the number of tabs or worksheets

Feb 18, 2012 at 7:40 AM

Is there any way to find out the number of tabs or worksheets in the Excel package?

Feb 18, 2012 at 9:25 PM
Edited Feb 18, 2012 at 9:28 PM

ExcelPackage.WorkBook.WorkSheets is an IEnumerable<ExcelWorksheet>, hence pck.Workbook.Worksheets.Count returns the number of worksheets in an ExcelPackage.