Search code examples
excelepplusworksheet

How to determine the most recently viewed worksheet ("ActiveSheet") in EPPlus


When you open a workbook in Excel, it shows you the worksheet you were looking at when you last saved it.

How do you determine which sheet this is when you open a workbook using EPPlus?


Solution

  • ExcelWorksheet activeSheet = Workbook.Worksheets.FirstOrDefault(f => f.View.TabSelected);

    https://epplus.codeplex.com/discussions/456307