Closed citro333 closed 4 years ago
i think you should see Example first
You probably should use index 0 instead of 1 to get the first worksheet (unless you want the second).
EPPlus changed in newer versions and indexes now start on 0 instead of 1. Check if your application use 0 or 1 based indexes using the following:
yourExcelPackage.Compatibility.IsWorksheets1Based
If this is not the problem, then we need more information.
Well, I reinstalled the Visual Studio, because I noticed some problems with other UWP projects as well and now the code works fine. I'm sorry for my first post as the problem was on my side not in EPPlus library.
I'm trying to use EPPlus for UWP application but I still got IndexOutOfRange exception on Worksheet object. The same code works fine in Windows Forms project. Here is the part of the code that makes problem:
ExcelWorksheet ws = new ExcelPackage (new FileInfo(@"D:\test.xlsx")).Workbook.Worksheets[1];