FileInfo excelFile = new FileInfo(excelFilePath); ;
ExcelPackage.LicenseContext = LicenseContext.NonCommercial;
using (ExcelPackage package = new ExcelPackage(new FileInfo(excelFile.ToString())))
{
foreach (ExcelWorksheet worksheet in package.Workbook.Worksheets)
{
List<string> ColumnNames = new List<string>();
for (int i = 1; i <= worksheet.Dimension.End.Column; i++)
{
ColumnNames.Add(worksheet.Cells[1, i].Value.ToString()); }
}
}