XlxlO - Last non blank row in particular column


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

1 Reply 1 reply marked as answer

KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team April 6, 2021 06:44 AM UTC

Hi Raahul, 

Greetings from Syncfusion. 

Syncfusion XlsIO do not have any built-in function to find the last non-blank cell in a column. We request you to use the code which you have shared us to find the last non-blank cell in a column. 

Regards, 
Keerthi. 


Marked as answer
Loader.
Up arrow icon