Get the Column Index Name From Excel

As of newer times, we can use the Helper methods:

And do have also the benefit, that we are not limited after Z instead of the Convert.ToChar(65 + X Approach

calculate the position by

  • using datatable and the ordinal property from the data column (DataTable approach)
    OR
  • retrieve first line from excel and calculate position index from there