This project has moved and is read-only. For the latest updates, please go here.

.Cells.End.Row returns wrong value

Sep 23, 2012 at 10:41 PM


first of all thank you for this great lib. It makes my work a lot easier.

but i have a problem here. If I use .Cells.End.Row it always returns 1048576.

I don't know wether this is a bug or I'm just using it the wrong way.

here's my source:

if (!kartehinzufuegen)

                testblatt.Cells[58, 1, testblatt.Cells.End.Row, 6].Copy(testblatt.Cells[32, 1, testblatt.Cells.End.Row-26, 6]);
                testblatt.Cells[testblatt.Cells.End.Row - 26, 1, testblatt.Cells.End.Row, 6].Clear();


Sep 28, 2012 at 4:45 PM

Use Worksheet.Dimension.End.Row instead.

Oct 11, 2012 at 6:23 PM

Thanks that was it.