We need to create a named range in worksheet and for that we used the following MS Excel Interop:
Cells.SpecialCells(XlCellType.xlCellTypeLastCell) to get the very last cell on the sheet. Note that it takes into account max column and return cell in that column even if cell on the last row is empty for that column. Since we needed the whole data range it served our purpose well.
Now, translating our code to Aspose.Cells we tried to use Cells.LastCell. But that gives last populated cell on the last row. So if that row has no data for the last column it won’t give it as the last cell.
Here is example to clarify.
A B C
1 a1 b1 c1
MS Excel InteropCells.SpecialCells(XlCellType.xlCellTypeLastCell) = "C2"
Aspose.Cells’ Cells.LastCell = “A2”.
Is there an easy way to get “C2” in Aspose.Cells ? Of course, we can iterate through each column to find out maximum and then get last cell using it, but we are looking for easier way
This message was posted using Page2Forum from LastCell Property - Aspose.Words for .NET