Get Cell's Row number using EPPlus

John Bustos picture John Bustos · Dec 21, 2012 · Viewed 10.2k times · Source

How can I find the row numer of a specific cell using the EPPLus library?

I'm looking for a method along the lines of Cl.Row, but am not seeming to find it - Do I have to use the cl.Address and parse the row number out myself??

I'm sure this is a stupid Newbie question, but I can't seem to find the correct method.

Thanks!

Answer

Tim Schmelter picture Tim Schmelter · Dec 21, 2012

The cell is an ExcelRange, this has Start and End properties. If you want to know the row of the start of the range:

Dim row As Int32 = cell.Start.Row