How to access worksheets in EPPlus?
Also, you can manage them by referencing the name:
var worksheet = package.Workbook.Worksheets["Sheet1"];
I believe that excel does worksheets from index 1 not index 0
var worksheet = package.Workbook.Worksheets[0];
should be
var worksheet = package.Workbook.Worksheets[1];
to read the first worksheet.
At least with Epplus 3.1.3.0 you can simply use the following to access the first worksheet.
ExcelWorksheet workSheet = excel.Workbook.Worksheets.First();