Count excel rows
-
I am opening putting data in an excel workbook, I am counting the rows with
rw=ws.range("1;1").specialcells(11)Then add the code to the row below
ws.Cells(rw.row+1,1).Value = a ws.Cells(rw.row+1,2).Value = b ws.Cells(rw.row+1,3).Value = d ws.Cells(rw.row+1,4).Value = rs ws.Cells(rw.row+1,5).Value = riseThis works as intended but the cell that has formatting is considered not empty.
In excel vba I would use
rw=cells(rows.count,1).end(xlup).rowThis will find the last row with something in it in column 1 and does not include formatting, such as borders.
Is there an equivalent to this in Ruby? -
Generally: Ruby can only use Excel via the WIN32OLE class, which just wraps OLE Automation. So it should be similar to VBA. In fact, I myself have this MS page bookmarked as the reference to use for WIN32OLE <-> Excel interaction:
Object model (Excel VBA reference) -
More Specifically: Would the
Range.Findmethod help?
Range.Find method
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement