How to find the last column of a row ?

Nov 7, 2013 at 8:20 AM
Edited Nov 7, 2013 at 8:30 AM

How I can find the last column with a value of a row ?

I can't use worksheet.Dimension.End.Column because the result is the last row of the whole worksheet.

For example, I would like to have the last row with a value of the seventh column.

Thank you,

Nov 7, 2013 at 9:28 AM
There is no automatic way to do that. Try a linq query over epplus cells.

Nov 7, 2013 at 10:57 AM
Edited Nov 7, 2013 at 10:59 AM
I tried linq query but I did not found how to do.

I tried something like that :
        Dim cells = From c
                     In _ws2.Cells("A:" & _currentRow)
                     Where c.Value IsNot Nothing And c.Text.ToString() <> ""
Can you help me ?

Best regards,


PS : Sorry for my english, I am French.
Nov 7, 2013 at 11:24 AM

There are some examples in our repository. Please take a look at