Hi,
In Excel macro, using End(xlUp).Row to find the last non-blank cell in a particular column.
Is there any alternative to the below equivalent XlslO code i.e. any inbuilt function?
Macro Codes | Equivalent C# code using XlsIO |
lastRow = [A65536].End(xlUp).Row |
int lastRow = GetXlRowTop(1, 65536, Sheets[0].Range["A65536"].IsBlank, Sheets[0]);
private int GetXlRowTop(int coloumnIndex, int rowIndex, bool value, IWorksheet sheet) { for (int row = rowIndex; row >= 1; row--) { if ((sheet.Range[row, coloumnIndex].IsBlank != value)) { return row; } } return 1; }
|
Regards,
Raahul