EPPlus: How to get column coordinate by column header name

  • Thread starter Thread starter Sudip_inn
  • Start date Start date
S

Sudip_inn

Guest
How to get column coordinate by column header name. suppose my column header looks like 1H 2014A. image attached

1616119.png

using (ExcelPackage package = new ExcelPackage(new FileInfo(filePath)))
{
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()); // 1 = First Row, i = Column Number
}
}
}

above code taken from here Epplus find column using column name

i just want to provide my column header name say 1H 2014A and want to get column coordinate....how it is possible ?

help me with code. thanks

thanks

Continue reading...
 
Back
Top