We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to find last used cell in excel row using Aspose.cell

HI Team,
How to find last used cell in row excel using aspose.cell
Excepted output :
1.1 row as a header row.
2. Second row content having f2 cell --> Excepted lasted used cell in 2nd row is F2
3.third row content having E3—> Excepted output for last used cell is E3
4, fourth row content having in cell g4–> Excepted output for last used cell is g4
5.5th row content having f5 cell --> Excepted lasted used cell in 5th row is F5

Sample Excel:Sample Excel.zip (6.3 KB)

@thiru1711,

Thanks for the template file and details.

Please use Worksheet.Cells.EndCellInRow for your needs.
e.g
Sample code:

            Workbook workbook = new Workbook(stringFileName);
            Worksheet objWS = workbook.Worksheets[0];
           //Get the last cell in the second row. 
           Cell objCell = objWS.Cells.EndCellInRow(1);

Hope, this helps a bit.