using OfficeOpenXml;
using System;
using System.Collections.Generic;

namespace BMA.EHR.Recurit.Exam.Service.Extensions
{
    public static class ExcelWorksheetExtension
    {
        public static string[] GetHeaderColumns(this ExcelWorksheet sheet, int row = 1)
        {
            List<string> columnNames = new List<string>();
            foreach (var firstRowCell in sheet.Cells[row, sheet.Dimension.Start.Column, 1, sheet.Dimension.End.Column])
                columnNames.Add(firstRowCell.Text);
            return columnNames.ToArray();
        }


    }
}
