MassiveAnt
New Member
- Joined
- Sep 13, 2006
- Messages
- 4
I've been trying to figure out how to get the last cell used in a column and I keep getting a blank cell that is way far down then where the last used cell actually resides. I thought it might be a formatting issue so I highlighted the cell and in excel, went to edit, and clear out all the contents and saved the file. But now the next "used" cell was a couple rows down from that. Is there anyway to find the last cell with data in it, like a string or int?
Hope someone can help .
Oh, I'm using the code
int nLastRow = m_oSheet.UsedRange.Rows.Count;
Hope someone can help .
Oh, I'm using the code
int nLastRow = m_oSheet.UsedRange.Rows.Count;