C# programming - Getting number of last non-blank cell (column)in a row.
Not sure how you translate this into C# but in VBA it would be
lastColumnNumber = xsheet.cells(1,columns.count).end(xltoleft).column
Hope this helps
Rowan
Paddy wrote:
I need to get the column number of the last non-blank cell in a row. I
am using the Excel Com object in a .NET app to get this done
I have something like this
Range rg = xSheet.get_Range("A1","A1"); // xSheet is the worksheet
object.
int lastColumnNumber = rg.Cells.....
I am not sure what the method call to do or the steps to follow.
Any help is appreciated,
- K.
|