Hi I am not sure how I can achieve it. How I can get the sheet names of an excel file using Epplus? I tried the below code but its not giving the output.
FileInfo fileInfo = new FileInfo(currentDir + @"/seo easier/" + "Backlinks_With_Logins.xlsx");
using (var package = new ExcelPackage(fileInfo))
{
package.Workbook.Worksheets.Select(x => x.Name);
}
2
Answers
I achieved it with the following code.
Your code seems to work but it doesn’t seem like you’ve put any code to output the names of the worksheets. Try adding a return statement like this:
Or assigning it to a variable and then outputting that: